Hi all I keep getting "Could not find package laravel/laravel with version 7.21.0" on composer install of Laravel. Fresh installation.
I have ran composer global require laravel/installer
I have tried a number of combinations of the below, but they all result in the error message in the subject, or, the installation of the latest build 7.30.0
composer create-project laravel/laravel:^7.21.0 appName
composer create-project laravel/laravel:^7.21.0 appName "7.21.0"
composer create-project laravel/laravel appName 7.21.0
This is a migration and since my app uses a handful of additional extensions, I want to keep the legacy version.
Thanks
CodePudding user response:
It's simply because that version of laravel (7.21.0
) doesn't exist.
Nonetheless, to Install specific version using laravel installer
Using composer you can specify the version you want easily by running
composer create-project laravel/laravel="5.1.*" myProject
Using the 5.1.* will ensure that you get all the latest patches in the 5.1 branch.
Side note: Laravel v7.28.0
to v7.0.0
requires php: ^7.2.5
CodePudding user response:
try this command I hope this will help you. Instead of 4.2 you can write whatever the version you want to use in your project.
composer create-project laravel/laravel your-project-name 4.2.*