How to load a project in Laravel in an old version?

Asked

Viewed 320 times

0

I have a project done in Laravel Framework 5.4 and recently Laravel made an update to 5.5, when passing my project to another computer, Laravel 5.5 was installed in this PC, now I can not work in this project.

In giving the command

php artisan serve

It returns this error:

PHP parse error: syntax error, Unexpected '.', expecting '&' or variable in C: Users Name_do_usuario Name_do_project vendor Laravel framework src Illuminate Foundation helpers.php on line 444

How do I load a project from an old version of the Laravel onto a computer that has the latest version of the Laravel?

4 answers

1

I had a similar problem now, but to create a project in version 5.2

From the commentary on:

You can try using Composer:

php Composer create-project Laravel/Laravel project name "5.4"

I came to command:

composer create-project laravel/laravel nome_do_projeto "5.2"

but presented an error, and it worked by modifying to:

composer create-project laravel/laravel nome_do_projeto "5.2.*"

0

The problem is on the line:

 function event(...$args)
 {
    return app('events')->fire(...$args);
 }

Make sure your php version is higher than 5.6.

0

You can try using the commiserate:

php composer create-project laravel/laravel nome_do_projeto "5.4"

Or directly in the Composer.json file:

"require": {
     "php": ">=5.6.4",
     "laravel/framework": "5.4",
     "laravel/tinker": "~1.0"
},

This way you limit the version of the Laravel to 5.4

0

Delete your Composer.lock file and then run the following command:

composer update;

or

composer install;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.