New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer 2 plugin autoloading #10413
Comments
This should be resolved soon as we migrate to Symfony 5.4, but anyway this should only happen if a plugin depends on symfony/finder, or if you have a php script handler in your composer.json. And in those cases we just have to load the application dependencies to avoid all sorts of other problems, but that sometimes does cause glitches with our deps. You didn't really provide enough info though so I have no idea what the exact cause is. The "sometimes" is weird though, there's probably a pattern you didn't identify yet. |
Thanks for the insight @Seldaek This is "scripts": {
"lint:analyse": [
"Composer\\Config::disableProcessTimeout",
"@php vendor/bin/phpcs --standard=phpcs.xml --report=json . > storage/phpcs.txt",
"@php vendor/bin/sarb remove-baseline storage/phpcs.txt phpcs.baseline storage/phpcs-baseline-removed.txt"
],
"lint:fix": [
"Composer\\Config::disableProcessTimeout",
"@php artisan lint:fix"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
"php artisan key:generate"
],
"phpstan": [
"phpstan analyse --memory-limit=-1"
]
}, So the |
Ah well yes that definitely looks like the root cause of the problem. Maybe you can run your CI with |
I'm pretty sure I don't actually need the dependency. It's coming via Would using the new "allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": false,
"composer/package-versions-deprecated": true
} |
I am not sure if that'll help, as per the above comments the issue is in:
Nothing to do with the plugin as far as I can tell, the plugin is maybe just a symptom of the problem, so you can try disabling it and see if it helps hide the problem for now.. |
I think this seems to have alleviated the issue. Closing. |
See PHPCSStandards/composer-installer#143
I believe this might be a composer bug as it shouldn't be autoloading application dependencies which is what produces the conflict? The plugin uses composer dependencies, and the stack trace seems to show Composer autoloading the application dependency version of
symony/finder
?I've observed the issue in Composer 2.0.6, 2.1.10, 2.1.14. Most of the time it works, sometimes it fails, always in the context of CI docker images.
The text was updated successfully, but these errors were encountered: