49

How do I install older version of Laravel framework using composer? The current version is 4.1 and I want to install Laravel 4.0.

5 Answers 5

80

either update your composer.json to what GregD mentioned or fetch it directly with

composer create-project laravel/laravel your-project-name 4.0.*

prefer this, as there can be some caveats when getting version 4.1 and wanting to downgrade (or even upgrade).

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

2 Comments

This is a very good option but am getting the Runtime error saying: Class Monolog\\Logger not found
The error may be because the shell is confused by the wildcard. Try installing a specific version without the asterisk at the end.
23

Finally it works, I just did four things:

composer create-project laravel/laravel mobilebanking 4.0

Change "dev" to "stable" in composer.json

Then run

composer self-update

After that, run this command

composer update --no-scripts

Comments

3
composer create–project laravel/laravel MiProyecto 5.3.*  o  
composer create–project laravel/laravel=5.3.* MiProyecto

Comments

2

Browse packagist - https://packagist.org/packages/laravel/laravel Find version you need and add it to composer i.e.

"require": {
    "laravel/laravel": "v4.0.0",
},

2 Comments

"4.0.*" would be the best option here, so you'd still be on the 4.0 branch, but get all the fixes for it.
Thanks GregD, problem with this option is that I will have to manually downgrate to version 4.0.*
1

Install it like this:

composer create-project laravel/laravel path/to/your/directory version

For Laravel versions 5.5 it looks like this:

composer create-project laravel/laravel path/to/your/directory 5.5

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.