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] Allow setting aliases & hidden via command name passed to the constructor#60739

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

Conversation

@HypeMC
Copy link
Member

@HypeMCHypeMC commentedJun 7, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#60394 (comment)
LicenseMIT

Currently, setting an alias and/or marking a command as hidden via the name doesn't work when the name is passed as a constructor argument. For example:

$command =newMyCommand('name|alias');

This issue was noticed while working on#60394 as mentioned in the comment there:#60394 (comment).

@chalasr
Copy link
Member

I think not supporting it was done on purpose at the time as that special syntax was specifically introduced for#[AsCommand], and I believe it works as expected until 7.3. If I'm not mistaken this should only be fixed there

@HypeMC
Copy link
MemberAuthor

@chalasr If that's the case, then it currently works as expected on all versions. The problem in#60394 is that I started using this for cases that don't include the#[AsCommand] attribute. I'll retarget 7.4 as a feature.

Of course, this isn't the only possible approach, but I personally prefer this one since it doesn't require duplicating the alias handling logic in yet another place. That logic already exists in theCommand andAddConsoleCommandPass classes.

@HypeMCHypeMCforce-pushed thefix-setting-aliases-and-hidden-via-name branch from270e21b toc37baa8CompareJune 7, 2025 15:54
@HypeMCHypeMC changed the base branch from6.4 to7.4June 7, 2025 15:54
@HypeMCHypeMC added Feature and removed Bug labelsJun 7, 2025
@HypeMCHypeMC modified the milestones:6.4,7.4Jun 7, 2025
@HypeMCHypeMC changed the title[Console] Fix setting aliases & hidden via name[Console] Enable setting aliases & hidden via nameJun 7, 2025
@HypeMCHypeMCforce-pushed thefix-setting-aliases-and-hidden-via-name branch fromc37baa8 to03d612aCompareJune 7, 2025 15:59
@HypeMCHypeMC changed the title[Console] Enable setting aliases & hidden via name[Console] Allow setting aliases & hidden via command name passed to the constructorJun 7, 2025
@nicolas-grekas
Copy link
Member

Thank you@HypeMC.

@nicolas-grekasnicolas-grekas merged commitf24ffa0 intosymfony:7.4Jun 8, 2025
10 of 11 checks passed
@HypeMCHypeMC deleted the fix-setting-aliases-and-hidden-via-name branchJune 8, 2025 12:49
This was referencedOct 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrchalasr approved these changes

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@dunglasdunglasAwaiting requested review from dunglas

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@jderussejderusseAwaiting requested review from jderusse

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees

No one assigned

Projects

None yet

Milestone

7.4

Development

Successfully merging this pull request may close these issues.

4 participants

@HypeMC@chalasr@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp