With the different features of Laravel, it is the most favorite framework amongst developers and companies using the PHP programming language. This adoption is due to the elegancy and scalability nature of the framework.
With the Laravel 9 release, the Laravel team switches from the traditional 6-month release cycle to a 12-month release cycle using the Semantic Versioning(Semver) approach.
The initial schedule of the Laravel 9 release was supposed to be September 2021, following the traditional approach. Still, the release date changed to January 2022 as stated by the creator and with a few valid reasons, as noted below.
In this article, will also detail how to update or upgrade to Laravel 9 and install and start building an app with the new Laravel 9.
Minimum PHP Requirement
Laravel 9 requires the newest version of PHP 8, PHPUnit 9, and a few other requirements specified in the future.
The PHP 8 requirement is because Laravel 9 is solely dependant on Symfony’s latest v6.0 release, which depends on PHP 8.
You can explore what is new in PHP 8 and the different PHP versions benchmarks to grasp the improvements and features of PHP 8 from Just-In-Time compiler (JIT) to constructor property promotion.
How to install Laravel 9
If you’re like us, we love to explore the newest technologies before being open to the public. You can start playing with the upcoming Laravel v9 for development and testing purposes. You can easily install and run it on your local machine following the guide below.
In addition, Laravel 9 supports PHP version 8. Make sure to check and upgrade your PHP version to use Laravel 9 before next January 2022.
To install Laravel 9, the first method is the Laravel global CLI which creates a new Laravel project from the branch specified. In this case, we will choose to create the new Laravel project from the dev branch.
Run the following command below in your directory to create a new Laravel 9 project. Make sure to have Laravel CLI installed globally.
$ laravel new laravel-9-todo-app --dev
Next, to install Laravel 9 using composer, run the following command to install Laravel v9:
& composer create-project --prefer-dist laravel/laravel laravel-9-todo-app dev-develop
The composer command will create a new Laravel project with project name as laravel-9-todo-app
, using the dev-develop
will result in the latest Laravel 9.
Now that we have Laravel 9 installed, you can navigate to the new laravel-9-todo-app
directory and run the following artisan command to check the version:
& cd laravel-9-dev
& php artisan --version
// Laravel Framework 9.x-dev
Conclusion
It also explored how to update or upgrade to Laravel 9 and install and start building an app with the new Laravel 9.
I hope you enjoyed the read!
Feel free to follow me on GitHub, LinkedIn and DEV for more!
Top comments (1)
Do you able to install Laravel 9 on your system with the steps you have mentioned?
I have got the issue when I tried to do so. Please look into it and help to resolve.
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command" "package" "directory" "ver
sion".