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
Normalizing composer.json
in other directory inconsistency
#865
Comments
Facing the same issue when using this plugin to normalize composer.json present in other directories. It would be good to have it working correctly before July 2022, when "allow-plugins" feature is strictly implemented. |
Not sure, but seems to me like this is expected behavior. I will take a closer look. |
Possibly related to #738. |
Update: Post composer 2.3.9 release running |
I‘ll see what I can do about it! Thank you for your report. |
Here's a reference to the exact same issue composer/composer#10935 for |
Thank you, @secretsayan! |
Hopefully fixed by composer/composer@0e59fbb - which is in Composer 2.3.10 |
@Seldaek I have checked with Composer 2.3.10 and found issue still present with |
Can you print the stack trace if you run normalize with Maybe I missed smth though. Anyway clear way to reproduce this would be interesting, as well as the stack trace. |
Quick scenario to reproduce:
|
My {
"name" : "secretsayan/myrepo",
"description": "This is the root composer.json",
"license": "MIT",
"require": {
"ergebnis/composer-normalize": "^2.28"
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true
}
}
} My target composer.json which I am trying to normalize.
Output of
When I run this command:
I get the following output in my local:
Expected Behaviour: Exception Trace from a different CI System:
|
OK I think I see the issue.. Probably should use the file's dir as CWD when loading a Composer instance like that, it'd make more sense. I'll see if I can fix that on the Composer side. |
composer/composer@93eb19e should resolve this - |
I can confirm it resolves the problem. |
Thanks a lot @Seldaek! |
composer.json
in other directory inconsistency
Closing as it seems that this issue has been resolved. |
Steps required to reproduce the problem
allow-plugins
featurecomposer.json
, in the root, perfectly fine:composer.json
, in subdirectoryfoo
with a content (clearly, not normalized):composer normalize foo/composer.json
Expected Result
composer.json
infoo
is normalized, with no questions askedActual Result
Composer asks for plugins to be allowed (phpstan/extension-installer is only to show that it asks for all, not only about the currently used plugin), having using plugin denied it still normalizes
composer.json
.I'd expect normalizing
composer.json
without any interaction, I'd understood not normalizing it after not allowing the plugins, but this behaviour is super weird.The text was updated successfully, but these errors were encountered: