Laravel 10: What's new

Published on
Read time
2 min read
  • Name
    Dumitru Caldare
    Written by
    Dumitru Caldare

Laravel 10 is now released and here you can find all the changes that it brings.

PHP 8.1

In Laravel 10, the framework will no longer provide support for PHP versions equal to or below 8.0, with the minimum requirement being set to PHP ^8.1, this mean that now we can see 8.1 features used in framework.

Native type declarations

With the release of Laravel 10.x, the application skeleton and all stubs have been updated to introduce argument and return types to all method signatures, removing unnecessary "doc block" type-hint information. This update is backward compatible with existing applications, which will continue to function normally without these type-hints.


Laravel has integrated the Symfony Process component, providing an easy-to-use API for running external processes within a Laravel application.

use Illuminate\Support\Facades\Process;

$result = Process::run('ls -la');

return $result->output();

The Process includes the followinng features:

  • different helpful methods that can be used to examine process result
  • methods to build the process instance
  • asynchronous processes
  • working with a pool of concurrent processes
  • Process fake method for convinient testing

Artisan Test Profiling

A fresh addition to the Artisan test command is the --profile option, which simplifies the process of pinpointing the slowest tests in your application:

php artisan test --profile

Pest Scaffolding

Laravel now offers Pest test scaffolding as the default option for new projects. To enable this functionality, use the --pest flag while creating a new application using the Laravel installer:

laravel new <project-name> --pest

CLI Prompts

In an effort to enhance the development experience of the framework, Laravel's built-in make commands no longer necessitate any input. In the absence of input, invoking these commands will prompt you to provide the necessary arguments:

php artisan make:controller

Laravel Pennant

Laravel Pennant, a new official package, is now available. It provides a lightweight and efficient method for handling feature flags in your application. By default, Pennant includes an in-memory array driver and a database driver to store features persistently.

Try out laravel 10

To commence testing the latest features of Laravel 10, you can install it in a new project by using laravel commmand:

laravel new <project-name>

or upgrade your current project by followinng the upgrade guide.


© KodeKrush 2023