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

0

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

When giving the command

php artisan serve

It returns this error:

  

PHP parse error: syntax error, unexpected '.', expecting '&' or   variable in   C: \ Users \ UserName \ ProjectName \ vendor \ laravel \ framework \ src \ Illuminate \ Foundation \ helpers.php   online 444

How do I load a project from an older version of laravel to a computer that has the latest laravel version?

    
asked by anonymous 11.10.2017 / 15:08

4 answers

1

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

From the comment:

  

You can try using the composer:

     

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

I came to the command:

composer create-project laravel/laravel nome_do_projeto "5.2"

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

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

    
11.10.2017 / 18:51
0

The problem is on the line:

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

Make sure your version of php is greater than 5.6.

    
11.10.2017 / 15:25
0

You can try using composer :

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

Or straight into the composer.json file:

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

In this way you limit the version of laravel to 5.4

    
11.10.2017 / 15:26
0

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

composer update;

or

composer install;
    
11.10.2017 / 15:36