[Fixed] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Events\Dispatcher::dispatch()

[Fixed] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Events\Dispatcher::dispatch()

I was upgrading this site to Laravel 5.4 and encountered an issue during the upgrade during a composer install.
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Events\Dispatcher::dispatch() in /home/forge/domain.com/vendor/laravel/framework/src/Illuminate/Console/Application.php:56
On another page
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Database\MySqlConnection::setFetchMode() in /var/www/htdocs/project/bootstrap/cache/compiled.php:11903
To fix this i did the following.
cd bootstrap/cache
rm -f compiled.php
rm -f services.php
php artisan cache:clear
php artisan view:clear
composer update

Categories: Posts