Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Fix the list of supported shells for completions in a phar#50111
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Using glob inside a phar does not work (it does not find anything).Using a DirectoryIterator on the other hand works with phars. Thisallows this command to compute the list of supported shells properlywhen used inside a phar.
fabpot commentedApr 22, 2023
Thank you@stof. |
guvra commentedMay 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
FYI this introduced a regression on our side because the folder "Resources" is now mandatory (which was not the case before), so our compiled phar file didn't work anymore because we only included php files in it. Easily fixable on our side by forcing the phar compiler to include these completion files though. |
stof commentedMay 17, 2023
Well, I would say that working with modified source code of the component is not really covered by our BC policy. |
guvra commentedMay 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes I understand that, it's why i said that it's easily fixable on our side 👍
Actually, when the Resources folder does not exist, the new code logic breaks any command that uses the symfony/console package, not just the command "DumpCompletionCommand" where the code logic was changed. It's because the logic is contained in the method |
Using glob inside a phar does not work (it does not find anything). Using a DirectoryIterator on the other hand works with phars. This allows this command to compute the list of supported shells properly when used inside a phar.
Easy way to reproduce the bug: run
composer completion unsupported(or more realisticallycomposer completionin a zsh shell as zsh is not a supported shell in symfony/console 5.4) with composer 2.5.5 and see that you get this error with an empty list of supported shells: