Can I see composer.json?
Laravel 9 upgrade / composer update / bootstrap cache problem
After making the required changes to my composer.json file and running composer update I get the following error:
ERROR There are no commands defined in the "package" namespace.
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
When running php artisan list, there are several commands missing, including package:discover. Digging deeper, I discovered that the missing commands are consistent with the 'deferred' array in the bootstrap/cache/services.php file.
If I clear the bootstrap cache rm -rf bootstrap/cache/* before running composer update , the cache files are regenerated and result in the same error message (above).
What have I done wrong? What don't I understand?
From my Googling, I have discounted the following suggestions: app\Exceptions\Handler.php Throwable changes (changed during a previous upgrade), TrustedProxies Middleware (suggested changes already applied).
Any ideas? I am upgrading from Laravel 8 to 9.
Please or to participate in this conversation.