Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

composer create-project not installing Laravel 5.3

I have been trying to no avail to install Laravel 5.3 but keep getting 5.2 installed. Here's what i have done.

composer create-project laravel/laravel laravel53

This should pull in the latest version of laravel which is 5.3 right? Well, i thought so but i keep getting 5.2 installed

enter image description here

Then i felt it may be a problem with composer so i ran composer self-update

composer self-update

And still get 5.2 installed when i run create-project

I'm pretty sure i am getting something wrong because i ran this same command on a friend's laptop and 5.3 got installed

I am using a mac book pro BTW

Any ideas why this is so and how it can be solved?

Much thanks

like image 929
Picrasma Avatar asked Aug 30 '16 16:08

Picrasma


2 Answers

I found out that the problem has been my php version all along. The version I had was 5.5 and laravel 5.3 requires php version 5.6 or higher.

For anyone having this issue, first thing you might want to do is to check your php version and upgrade to 5.6 or higher. This one line installation worked for me

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

Depending on the version you want and the OS specs, check this resource out http://php-osx.liip.ch/ it was very helpful for me.

so to install laravel5.3, you could use composer create-project:

composer create-project laravel/laravel projectName

or

composer create-project laravel/laravel=5.3.0 projectName --prefer-dist

Thanks and good luck!

like image 90
Picrasma Avatar answered Oct 06 '22 00:10

Picrasma


First of all try to clear the composer cache:

composer clear-cache

Then try with this command:

composer create-project laravel/laravel=5.3.4 laravel53 --prefer-dist

Alternatively, open the composer.json file and change this:

"require": {
    "laravel/framework": "5.2.*"
},

to:

"require": {
    "laravel/framework": "5.3.*"
},

and then composer update

like image 22
Moppo Avatar answered Oct 05 '22 22:10

Moppo