Closed ajnsn closed 6 months ago
We do actually use the composer/composer
dependency in various places.
There's an open PR on the Composer side which looks like it may fix this, see https://github.com/composer/composer/pull/11943.
Thanks for your fast feedback.
I just had the error in Laravel Forge today - without changing anything. Just a new deploy. Yesterday it was still working.
There will probably be a lot of Statamic devs who will run into this error soon. At least we now have a own issue about it.
There's been some discussion about this issue on the Discord. Someone has shared a workaround:
It seems to also get fixed by removing the composer/composer package itself in /vendor and updating/reinstalling the package. This way I didn't have to downgrade composer globally.
rm -rf vendor/composer/composer && composer update composer/composer
It seems to also get fixed by removing the composer/composer package itself in /vendor and updating/reinstalling the package. This way I didn't have to downgrade composer globally.
rm -rf vendor/composer/composer && composer update composer/composer
Thanks. I can confirm this works.
It seems to also get fixed by removing the composer/composer package itself in /vendor and updating/reinstalling the package. This way I didn't have to downgrade composer globally.
rm -rf vendor/composer/composer && composer update composer/composer
Thanks, it fixed the problem for me!
Thanks @Seldaek!
@duncanmcclean that said.. Please don't just shove this under the rug.
We do actually use the
composer/composer
dependency in various places.
Are you sure? I just found 4 usages:
https://github.com/search?q=repo%3Astatamic%2Fcms+"use+composer"&type=code
The first the script one definitely doesn't need composer/composer as that is code that will be executed by Composer itself where the class exists.
The other 3 using version parser should just require composer/semver
.
If I missed something I'm happy to take a closer look.
We may have required composer/composer
intentionally at one point, but it looks like you're right that we could get away with just requiring semver
now. Thanks!
We appreciate you chiming in here @Seldaek. Wasn't expecting that, especially on your vacation. Go try to enjoy it! 🏝️
Bug description
Deploying Statamic
How to reproduce
Composer 2.7.3, works with 2.7.2
"fyi"
See https://github.com/composer/composer/issues/11940
Can be fixed by removing the composer/composer dependecy, see comment
Logs
No response
Environment
Installation
Existing Laravel app
Antlers Parser
None
Additional details
No response