Laravelで動いていたシステムでphp artisanが動かなくなってしまいました。
試したことは、.envファイルの存在確認と、開発環境がdevelopmentであること。
それから、bootstrap/cache/のリセットと権限の設定、
storage/logsのWEBサーバーからの書き込み権限確認
Gitを用いて、現在動いている本番環境と同じ環境であることを確認しました。
よろしくお願いします。
[ec2-user@ project]$ composer dump-autoload Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:767 Stack trace: #0 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('config') #1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('config') #2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('config', Array) #3 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->make('config', Array) #4 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('config') #5 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(57): Illuminate\Container\ in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 767 Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": "^7.1.3", "aws/aws-sdk-php-laravel": "~3.0", "barryvdh/laravel-dompdf": "^0.8.3", "doctrine/dbal": "^2.7", "fideloper/proxy": "^4.0", "laravel/framework": "5.6.*", "laravel/passport": "^6.0", "laravel/socialite": "^3.0", "laravel/tinker": "^1.0", "laravelcollective/html": "^5.4.0", "league/flysystem-aws-s3-v3": "~1.0", "myclabs/php-enum": "^1.6", "simplesoftwareio/simple-qrcode": "~2", "kylekatarnls/laravel-carbon-2": "^1.0.0", "nesbot/carbon": "2.0.0-beta.2 as 1.25.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.2", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "laravel/dusk": "^4.0", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.0", "squizlabs/php_codesniffer": "^3.3" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate" ], "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover" ], "phpcs": [ "phpcs --standard=phpcs.xml --extensions=php ." ], "phpcbf": [ "./vendor/bin/phpcbf --standard=./phpcs.xml" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true }