Blessen Mathew
Blessen Mathew

Reputation: 11

How to fix "PHP Parse error: syntax error, unexpected '=' in /var/www/.../vendor/laravel/RoutesRequests.php on line 156"

PHP Parse error:

syntax error, unexpected '=' in /var/www/.../api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php on line 156

I did a clean install of Lumen. I recently upgraded php to 7.3 but composer is still older.

Upvotes: 1

Views: 3492

Answers (2)

Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18803

Update PHP to 7.3 OR downgrade Lumen to 7.9

Upvotes: 1

Farid
Farid

Reputation: 772

That error seems to be related to a PHP version issue. So I suggest you to check php version used in the site which fires the error. Anyway you wish to update your local composer, try with this command in your terminal

composer self-update

Upvotes: 0

Related Questions