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

[Console] Fix issue with reserved keyword "command" as argument name#54795

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

Open
flkasper wants to merge5 commits intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromflkasper:feature/fix-issue-54729

Conversation

flkasper
Copy link

@flkasperflkasper commentedMay 1, 2024
edited by OskarStark
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#54729
LicenseMIT

In theInputArgument constructor, anInvalidArgumentException is thrown if the reserved keywordcommand is used as the name and is not the argumentcommand name.

The change to this PR is a new non-breaking feature, but could also be merged into older versions as a bugfix.

cavias reacted with eyes emoji
@chalasr
Copy link
Member

Thanks for the PR. Although it is hack-ish, I'm ok with the argument description' string-based check.
To prevent regressions we need a test case that makes us able to catch a potential change to thecommand argument description and forces us to sync the description used inInputArgument.

Changing the milestone for 7.2 also as 7.1 is in feature-freeze and this is a DX improvement, not a bugfix.

@chalasrchalasr modified the milestones:7.1,7.2May 1, 2024
@chalasrchalasr added DXDX = Developer eXperience (anything that improves the experience of using Symfony) and removed Bug labelsMay 1, 2024
@fabpot
Copy link
Member

An alternative could be to rename the internalcommand name to__command to avoid the potential clash.

OskarStark reacted with thumbs up emoji

@OskarStarkOskarStark changed the title[Console] Fix issue with reserved keyword 'command' as argument name[Console] Fix issue with reserved keyword "command" as argument nameMay 2, 2024
@flkasper
Copy link
Author

flkasper commentedMay 4, 2024
edited by chalasr
Loading

An alternative could be to rename the internalcommand name to__command to avoid the potential clash.

See discussion at#54729.
A collision would not be 100% avoidable with a renaming.

It would also be a major breaking change.
Many libraries that are based on Symfony would also have to be adapted; in Symfony's own code alone, this is used in many places to execute other commands.

@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alexandre-dauboisalexandre-dauboisalexandre-daubois left review comments

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Labels
ConsoleDXDX = Developer eXperience (anything that improves the experience of using Symfony)FeatureStatus: Needs Review
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

Command: Adding argument called 'command' makes other args/options unreadable
5 participants
@flkasper@chalasr@fabpot@alexandre-daubois@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp