Laravelでcomposer updateすると、php artisanが動かなくなります。
全く解決の糸口が見えず困っています。よろしくお願いします。
環境は以下です。
PHP 7.1.33 (cli) (built: Oct 31 2019 17:36:04) ( NTS ) Laravel Framework 5.6.38
エラー内容
[ec2-user@ project]$ $ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 26 installs, 67 updates, 0 removals - Installing kylekatarnls/update-helper (1.2.0): Downloading (100%) - Updating symfony/polyfill-ctype (v1.9.0 => v1.12.0): Downloading (100%) - Updating vlucas/phpdotenv (v2.5.1 => v2.6.1): Downloading (100%) - Updating symfony/css-selector (v4.1.4 => v4.4.0): Downloading (100%) - Updating tijsverkoyen/css-to-inline-styles (2.2.1 => 2.2.2): Downloading (100%) - Updating symfony/polyfill-php72 (v1.9.0 => v1.12.0): Downloading (100%) - Updating symfony/polyfill-mbstring (v1.9.0 => v1.12.0): Downloading (100%) - Updating symfony/var-dumper (v4.1.4 => v4.4.0): Downloading (100%) - Updating symfony/routing (v4.1.4 => v4.4.0): Downloading (100%) - Updating symfony/process (v4.1.4 => v4.4.0): Downloading (100%) - Installing symfony/polyfill-intl-idn (v1.12.0): Downloading (100%) - Installing symfony/mime (v4.4.0): Downloading (100%) - Updating symfony/http-foundation (v4.1.4 => v4.4.0): Downloading (100%) - Installing symfony/event-dispatcher-contracts (v1.1.7): Downloading (100%) - Updating symfony/event-dispatcher (v4.1.4 => v4.4.0): Downloading (100%) - Updating psr/log (1.0.2 => 1.1.2): Downloading (100%) - Updating symfony/debug (v4.1.4 => v4.4.0): Downloading (100%) - Installing symfony/polyfill-php73 (v1.12.0): Downloading (100%) - Installing symfony/error-handler (v4.4.0): Downloading (100%) - Updating symfony/http-kernel (v4.1.4 => v4.4.0): Downloading (100%) - Updating symfony/finder (v4.1.4 => v4.4.0): Downloading (100%) - Installing symfony/service-contracts (v1.1.8): Downloading (100%) - Updating symfony/console (v4.1.4 => v4.4.0): Downloading (100%) - Updating doctrine/lexer (v1.0.1 => 1.0.2): Downloading (100%) - Updating egulias/email-validator (2.1.5 => 2.1.11): Downloading (100%) - Installing symfony/polyfill-iconv (v1.12.0): Downloading (100%) - Updating swiftmailer/swiftmailer (v6.1.3 => v6.2.3): Downloading (100%) - Installing symfony/translation-contracts (v1.1.7): Downloading (100%) - Updating symfony/translation (v4.1.4 => v4.4.0): Downloading (100%) - Updating nesbot/carbon (1.25.0 => 1.25.3): Downloading (100%) - Updating monolog/monolog (1.23.0 => 1.25.2): Downloading (100%) - Updating league/flysystem (1.0.47 => 1.0.57): Downloading (100%) - Updating erusev/parsedown (1.7.1 => 1.7.3): Downloading (100%) - Updating dragonmantank/cron-expression (v2.2.0 => v2.3.0): Downloading (100%) - Updating doctrine/inflector (v1.3.0 => 1.3.1): Downloading (100%) - Updating laravel/framework (v5.6.38 => v5.6.39): Downloading (100%) - Installing ralouphie/getallheaders (3.0.3): Downloading (100%) - Updating guzzlehttp/psr7 (1.4.2 => 1.6.1): Downloading (100%) - Updating guzzlehttp/guzzle (6.3.3 => 6.4.1): Downloading (100%) - Updating aws/aws-sdk-php (3.67.12 => 3.121.0): Downloading (100%) - Updating aws/aws-sdk-php-laravel (3.1.0 => 3.4.0): Downloading (100%) - Updating doctrine/event-manager (v1.0.0 => 1.1.0): Downloading (100%) - Updating doctrine/cache (v1.8.0 => 1.9.1): Downloading (100%) - Updating doctrine/dbal (v2.8.0 => v2.9.3): Downloading (100%) - Updating fideloper/proxy (4.0.0 => 4.2.1): Downloading (100%) - Updating nikic/php-parser (v4.0.3 => v4.3.0): Downloading (100%) - Updating jakub-onderka/php-console-color (0.1 => v0.2): Downloading (100%) - Updating jakub-onderka/php-console-highlighter (v0.3.2 => v0.4): Downloading (100%) - Updating psy/psysh (v0.9.8 => v0.9.9): Downloading (100%) - Updating laravel/tinker (v1.0.7 => v1.0.10): Downloading (100%) - Updating league/flysystem-aws-s3-v3 (1.0.19 => 1.0.23): Downloading (100%) - Updating fzaninotto/faker (v1.8.0 => v1.9.0): Downloading (100%) - Updating mockery/mockery (1.1.0 => 1.2.4): Downloading (100%) - Updating filp/whoops (2.2.1 => 2.5.0): Downloading (100%) - Updating nunomaduro/collision (v2.0.3 => v2.1.1): Downloading (100%) - Updating sebastian/resource-operations (1.0.0 => 2.0.1): Downloading (100%) - Updating sebastian/exporter (3.1.0 => 3.1.2): Downloading (100%) - Updating sebastian/environment (3.1.0 => 4.2.3): Downloading (100%) - Updating sebastian/diff (3.0.1 => 3.0.2): Downloading (100%) - Updating phpunit/php-timer (2.0.0 => 2.1.2): Downloading (100%) - Updating theseer/tokenizer (1.1.0 => 1.1.3): Downloading (100%) - Updating phpunit/php-token-stream (3.0.0 => 3.1.1): Downloading (100%) - Updating phpunit/php-code-coverage (6.0.7 => 6.1.4): Downloading (100%) - Updating webmozart/assert (1.3.0 => 1.5.0): Downloading (100%) - Updating phpdocumentor/reflection-common (1.0.1 => 2.0.0): Downloading (100%) - Updating phpdocumentor/type-resolver (0.4.0 => 1.0.1): Downloading (100%) - Updating phpdocumentor/reflection-docblock (4.3.0 => 4.3.2): Downloading (100%) - Updating doctrine/instantiator (1.1.0 => 1.3.0): Downloading (100%) - Updating phpspec/prophecy (1.8.0 => 1.9.0): Downloading (100%) - Updating myclabs/deep-copy (1.8.1 => 1.9.3): Downloading (100%) - Updating phpunit/phpunit (7.3.5 => 7.5.17): Downloading (100%) - Updating lcobucci/jwt (3.2.4 => 3.3.1): Downloading (100%) - Updating league/event (2.1.2 => 2.2.0): Downloading (100%) - Updating league/oauth2-server (7.2.0 => 7.4.0): Downloading (100%) - Updating phpseclib/phpseclib (2.0.11 => 2.0.23): Downloading (100%) - Updating symfony/psr-http-message-bridge (v1.1.0 => v1.2.0): Downloading (100%) - Updating zendframework/zend-diactoros (1.8.6 => 1.8.7): Downloading (100%) - Installing bacon/bacon-qr-code (1.0.3): Downloading (100%) - Installing simplesoftwareio/simple-qrcode (2.0.0): Downloading (100%) - Installing sabberworm/php-css-parser (8.3.0): Downloading (100%) - Installing phenx/php-svg-lib (v0.3.3): Downloading (100%) - Installing phenx/php-font-lib (0.5.1): Downloading (100%) - Installing dompdf/dompdf (v0.8.3): Downloading (100%) - Installing barryvdh/laravel-dompdf (v0.8.5): Downloading (100%) - Installing league/oauth1-client (1.7.0): Downloading (100%) - Installing laravel/socialite (v3.3.0): Downloading (100%) - Installing laravelcollective/html (v5.6.10): Downloading (100%) - Installing myclabs/php-enum (1.7.2): Downloading (100%) - Installing maximebf/debugbar (v1.15.1): Downloading (100%) - Installing barryvdh/laravel-debugbar (v3.2.8): Downloading (100%) - Installing facebook/webdriver (1.7.1): Downloading (100%) - Installing laravel/dusk (v4.0.5): Downloading (100%) - Installing squizlabs/php_codesniffer (3.5.2): Downloading (100%) symfony/polyfill-intl-idn suggests installing ext-intl (For best performance) symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher () symfony/service-contracts suggests installing symfony/service-implementation () dompdf/dompdf suggests installing ext-imagick (Improves image processing performance) dompdf/dompdf suggests installing ext-gmagick (Improves image processing performance) maximebf/debugbar suggests installing kriswallsmith/assetic (The best way to manage assets) maximebf/debugbar suggests installing predis/predis (Redis storage) facebook/webdriver suggests installing ext-SimpleXML (For Firefox profile creation) Writing lock file Generating optimized autoload files Carbon 1 is deprecated, see how to migrate to Carbon 2. https://carbon.nesbot.com/docs/#api-carbon-2 You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it. > 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') Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
AWSにとってあった動く頃の1年くらい前のAMIイメージから復元し、何もせずにまずcomposer updateをするだけでartisanが動かなくなります。今までは、普通にcomposer updateできていました。
おそらく、composer.jsonに含まれているモジュールのどれかがアップデートすることで問題を引き起こしていると考えます。