Reputation: 121
My app's backend suddenly stopped working, returning 500 HTTP error and this error in laravel.log:
[2020-09-16 12:28:15] local.ERROR: Uncaught Error: Class 'Illuminate\Http\Response' not found in /home/.../vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:424
[2020-09-16 12:28:19] local.ERROR: Class 'Illuminate\Http\Response' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Class 'Illuminate\\Http\\Response' not found at /home/../vendor/laravel/framework/src/Illuminate/Routing/Router.php:751)
Laravel version is 5.8.37
Anyone knows what could be wrong?
I've tried chmod -R 777 storage/, php artisan cache:clear, php artisan config:clear and composer dump-autoload, none worked.
Thank you in advance!
EDIT: Removing the vendor folder and running the below command fixed the issue, however I've noticed some errors during composer dump-autoload.
composer install
Here are the errors that showed up:
Deprecation Notice: Class Twilio\TwiML\Voice\Echo_ located in ./vendor/twilio/sdk/src/Twilio/TwiML/Voice/Echo.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class ConsoleTVs\Support\Traits\StringFUnctions located in ./vendor/consoletvs/support/Traits/StringFunctions.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Http\Controllers\BonusCardController located in ./app/Http/Controllers/Api/V1/BonusCardController.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\UserPartner located in ./app/Models/UserPartner.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\UserMarathon located in ./app/Models/UserMarathon.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Thank you!
Upvotes: 1
Views: 1413
Reputation: 12391
looks like somthing wrong with your vendor
folder so remove old vendor
folder then
run this cmd
composer install
then composer dump-autoload
here composer install
will install all the dependency of your project
and composer dump-autoload
will load all the file which is necessary to work with those dependency
Upvotes: 2