I try to install to install Laravel project version 9.0.0 using the next command
composer create-project laravel/laravel="9.0.0" my_project
After installation is completed I check version
php artisan --version
I see Laravel Framework 9.52.19
How to install the first version? Why I can't install specified version?
-
Change version in composer.json and composer updateMaksim– Maksim2025-01-21 18:58:55 +00:00Commented Jan 21 at 18:58
-
when you specify 9.0.0 composer installs the latest compatible version of laravel because of dependencies. try composer create-project laravel/laravel="9.0.0" my_project --no-installSoneye Oluwasina– Soneye Oluwasina2025-01-21 19:06:10 +00:00Commented Jan 21 at 19:06
-
Is there any good reason to start a new project with Laravel 9? That version is EOL since nearly a year, and v9.0.0 is even olderNico Haase– Nico Haase2025-01-22 07:39:04 +00:00Commented Jan 22 at 7:39
-
This question is similar to: Installing specific laravel 5 version with composer create-project. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.yivi– yivi2025-01-22 09:16:57 +00:00Commented Jan 22 at 9:16
Add a comment
|
1 Answer
Composer installs the latest patch release within the specified major and minor version. This means that when you specify 9.0.0, Composer actually installs the latest available patch for Laravel 9, which in your case is 9.52.19, because Laravel follows semantic versioning (MAJOR.MINOR.PATCH)
Instead of using composer create-project, manually install Laravel 9.0.0 by updating the core framework version in composer.json:
"laravel/framework": "9.0.0"
Then run:
composer update