1
votes

i'm trying to upgrade Laravel to the latest release using Docker with php 7.2 Ubuntu 16 Laravel 5.8 and after the update when i try to run everything to do with php artisan config:clear or any php artisan i get :

oot@88081fc77c2c:/data/www/html# php artisan cache:clear PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php:804 Stack trace: #0 /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(804): ReflectionClass->__construct('config') #1 /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(682): Illuminate\Container\Container->build('config') #2 /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(630): Illuminate\Container\Container->resolve('config', Array) #3 /data/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(768): Illuminate\Container\Container->make('config', Array) #4 /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1246): Illuminate\Foundation\Application->make('config') #5 /data/www/html/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(62): Illuminate\Container\Container->offsetGet('config') #6 /data/www/html/vendor/aws/aws in /data/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 806

if i add this file in the boostrap/cache as an return empty array, Laravel don't recognize view class, db class and on and on. Help please !!!!

P.S

1. added bootstrap/cache permissions
2. checked for empty spaces in the .env file
3. checked for , in the app/config.php file
2
Have you tried with composer dump-autoload?IlGala
Share your .env file with usUdhav Sarvaiya

2 Answers

0
votes

In composer.json

"require": {

        "laravel/framework": "6.5.*",
            },

then

composer install
0
votes

Thank you for your responses, in the end i just found out thar my /bootstrap/app.php file contained some unnecessary provider (which should be in the providers place), and after cleaning it it worked out

$app = new Illuminate\Foundation\Application( realpath(DIR.'/../') );

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    App\Http\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Console\Kernel::class,
    App\Console\Kernel::class
);

$app->singleton(
  Illuminate\Contracts\Debug\ExceptionHandler::class,
  App\Exceptions\PassportHandler::class
);

=> removed : 
$app->register(
  Aws\Laravel\AwsServiceProvider::class
);

return $app;