I changed my hosting and dev container. In the process, Composer got updated to version 2.4.2 (latest).
Now, if I run composer update or composer install (after removing the lock file), I always get this error:
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
<comment>In LoadConfiguration.php line 66:</comment>
<error> </error>
<error> </error>
<error> </error>
But running php artisan package:discover --ansi works just fine!
My .env file is also good (LF line endings, all variables with strange characters are in double quotes..)
I also tried to rename the vendor folder and reinstall everything, but I still get this error. What can I do? Thank you!
$ composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: WARNING
Your git version (2.17.1) is too old and possibly will cause issues. Please upgrade to git 2.24 or above
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: *************
Dev Public Key Fingerprint: ************
OK
Checking composer version: OK
Composer version: 2.4.2
PHP version: 8.1.10
PHP binary path: /usr/bin/php8.1
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
cURL version: 7.58.0 libz 1.2.11 ssl OpenSSL/1.1.1
zip: extension present, unzip present, 7-Zip not available
opened issue with Composer, but it's probably an issue with my configuration https://github.com/composer/composer/issues/11069
tried to downgrade php to v8.0.2, same problem