1 month ago

Error in BusServiceProvider.php after upgrading from Laravel 7 to 8

Posted 1 month ago by Garet

I have two projects, one of which I upgraded from Laravel version 7 to 8 without any issues.

However, I have upgraded my second project according to the instructions, and I'm now getting the following error in my logs:

[2020-09-20 18:03:02] local.ERROR: syntax error, unexpected ')' {"exception":"[object] (ParseError(code: 0): syntax error, unexpected ')' at XXX\vendor\laravel\framework\src\Illuminate\Bus\BusServiceProvider.php:51)

The only difference I know of between the two projects is that the successful one was written using Laravel 7 originally, whereas the one that isn't working was written using Laravel 6, later upgraded to Laravel 7, and now upgraded to Laravel 8.

I have checked the code in vendor\laravel\framework\src\Illuminate\Bus\BusServiceProvider.php and there is nothing wrong with it.

I am running PHP 7.4, and as mentioned my other project is working okay after upgrading to Laravel 8.

I've done all the usual things such as clearing the bootstrap/cache directory and also running php artisan cache:clear, composer dump-autoload, etc

What could I do to try and diagnose the issue?

Please sign in or create an account to participate in this conversation.