Reputation: 485
I just setup php 7.0.27 in both webserver and cli. My laravel project was working just fine before in php 7.2. When I try run command php artisan serve
it shows an error:
PHP Parse error: syntax error, unexpected '?', expecting variable
(T_VARIABLE) in /var/www/html/pmanager/pmanager/vendor/symfony/console
/Output/Output.php on line 40
I followed this github discussion which says that the solution is installing same versions in cli and webserver, which, in my case is fine. I have 7.0.27 in both.
Another thing they are pointing it out is laravel shows this error with php 7.0. I cannot change my php version to 7.1 or 7.2 because I must stick with it so as to run magento 2.1 projects.
Any help without changing php version would be highly appreciated.
Upvotes: 0
Views: 1022
Reputation: 51
you can downgrade your laravel 5.6 project to 5.5!!
- Changing the value of the Laravel version inside the
composer.json
file to the laravel 5.5.- Delete
/vendor
folder and runcomposer install
Upvotes: 1