Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing specific laravel 5 version with composer create-project

Today I try to install specific laravel version with composer create-project laravel/laravel=5.1.8 your-project-name --prefer-dist, because some of the plugins have trouble with version 5.1.9 and above.

However, the installation fail and it says Could not find package laravel/laravel with version 5.1.8. How can I install it with composer?

like image 451
user1995781 Avatar asked Aug 17 '15 03:08

user1995781


People also ask

Which PHP version is required for Laravel 5?

Server Requirements The Laravel framework has a few system requirements: PHP >= 5.4, PHP < 7. Mcrypt PHP Extension. OpenSSL PHP Extension.

How do I run an older version of Laravel project?

To install the old version of Laravel, the easiest way is to use the composer create-project command. Using this command we only have to specify the project name and Laravel version that we want it to be installed and there you go it's ready.


2 Answers

you can do:

composer create-project laravel/laravel myproject --prefer-dist v5.1.8

To see available versions, you can visit its packagist page (lower right):

https://packagist.org/packages/laravel/framework

UPDATED:

There is no actually a tag for v5.1.8 for package laravel/laravel, Your issue is the framework(core) of laravel..

What you can do to solve it is to edit your composer.json:

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.8"
    },

And do composer update "laravel/framework"

like image 55
Darryldecode Avatar answered Sep 21 '22 23:09

Darryldecode


A simple answer i can think of is

composer create-project laravel/laravel <app name> "5.1.*"

Just replace < app name > with your application name and you'll install laravel's 5.1 distribution.

like image 31
Farveaz Avatar answered Sep 24 '22 23:09

Farveaz