9

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

1
  • 2
    I think you need to add "minimum-stability": "beta" to your composer.json Commented Dec 18, 2015 at 12:13

5 Answers 5

18

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

Sign up to request clarification or add additional context in comments.

Comments

5

The Laravel 5.2 docs have the correct solution here:

composer create-project --prefer-dist laravel/laravel blog "5.2.*"

Comments

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

enter image description here

Comments

1

Today if you do the usual install it gets you 5.2.23

composer create-project laravel/laravel projectname --prefer-dist

Comments

1

the same happened to me. As my php version was lower than 5.5, the composer automatically downloaded the laravel version that was compatible to my php version and it was laravel 5.0.16. After installing php 5.5 it worked.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.