I'm starting a new project and i want to start it with a new version of laravel. I don't want to upgrade and old version.
How can I create a Laravel 5.2 project?
Where is my problem and what did I do:
I installed laravel 5.1 with
composer create-project --prefer-dist laravel/laravel projectname
also laravel new projectname
has the same problem.
This is the composer file after installing a fresh project
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
...
I also tried with
composer create-project laravel/laravel=5.2.0 projectname
but i got this error
could not find package laravel/laravel with version 5.2.0.
I tried with composer self-update
same problem
I read laravel 5.2 documentation. It is officially out
If you look at https://stackoverflow.com/a/25949281/3593996 the same question was asked when Laravel 5 was in develop version.
Now if you want to create 5.2 project you need to use dev-develop
as version in composer create project:
composer create-project laravel/laravel your-project-name dev-develop
But if you want to install 5.1 version you can use
composer create-project laravel/laravel your-project-name 5.1.*
or simple:
composer create-project laravel/laravel your-project-name
Similar is for older versions, for example:
composer create-project laravel/laravel your-project-name 5.0.*
or
composer create-project laravel/laravel your-project-name 4.2.*
When Laravel 5.2 will be released as stable, you will be able to install it using
composer create-project laravel/laravel your-project-name 5.2.*
or simple
composer create-project laravel/laravel your-project-name
and using
composer create-project laravel/laravel your-project-name dev-develop
you will probably install development version of Laravel 5.3
The Laravel 5.2 docs have the correct solution here:
composer create-project --prefer-dist laravel/laravel blog "5.2.*"
Note that Laravel 5.2.0 is still a beta version, not a stable version. So, for the fresh install:
composer create-project laravel/laravel your-project-name dev-develop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With