Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
fabpot merged 1 commit intosymfony:5.4fromstof:supported_shells_phar
Apr 22, 2023

Conversation

@stof
Copy link
Member

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Ticketsn/a
LicenseMIT
Doc PRn/a

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: runcomposer completion unsupported (or more realisticallycomposer completion in 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:

Detected shell "unsupported", which is not supported by Symfony shell completion (supported shells: "").

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
Copy link
Member

Thank you@stof.

@fabpotfabpot merged commit7589ff6 intosymfony:5.4Apr 22, 2023
This was referencedApr 28, 2023
@stofstof deleted the supported_shells_phar branchMay 11, 2023 13:58
@guvra
Copy link

guvra commentedMay 17, 2023
edited
Loading

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
Copy link
MemberAuthor

Well, I would say that working with modified source code of the component is not really covered by our BC policy.
Also, the whole command would break if you don't include these completion files (executing the command will read those files to generate things).

@guvra
Copy link

guvra commentedMay 17, 2023
edited
Loading

Well, I would say that working with modified source code of the component is not really covered by our BC policy.

Yes I understand that, it's why i said that it's easily fixable on our side 👍

Also, the whole command would break if you don't include these completion files (executing the command will read those files to generate things).

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 methodconfigure, which is called for all commands defined in the application.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@stof@fabpot@guvra@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp