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] don't discard existing aliases when constructing Command#62562

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
chalasr merged 1 commit intosymfony:7.4fromhenderkes:7.4
Dec 2, 2025

Conversation

@henderkes
Copy link

@henderkeshenderkes commentedNov 29, 2025
edited
Loading

QA
Branch?7.4
Bug fix?yes
New feature? no
Deprecations?no
IssuesFix#62557
LicenseMIT

Contributor guidelines:

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 8.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@OskarStarkOskarStark changed the title[Console] don't discard existing aliases when constructing Command (fix bug #62557)[Console] don't discard existing aliases when constructing CommandNov 29, 2025
}

// we must not overwrite existing aliases, combine new ones with existing ones
$aliases =array_unique([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think I would rather guard thesetAliases() call below to not call it with an empty array.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What's the intended behavior most likely?

Adding aliases from $name being split by| seems to be the latest change. Merging those into the array of existing ones feels most BC-safe over overwriting it if aliases here are not an empty array? 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think I would rather guard thesetAliases() call below to not call it with an empty array.

if ($aliases !== []) {$this->setAliases($aliases);            }

Like this? That alone wouldn't fix the issue of existing aliases, because if $name was 'name|newalias', it would still overwrite the existing ones.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I thought about that too and then I wondered if it is really realistic that someone updates the name to make use of the new opportunity to define name and aliases at once and then additionally also callssetAlias(). 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Though if we say that's something we want to keep we can indeed remove theif again.

andesk reacted with thumbs up emoji
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Perhaps not realistic, but entirely possible.

@henderkeshenderkesforce-pushed the7.4 branch 2 times, most recently from08fe044 to2ae73e6CompareNovember 29, 2025 13:19
@chalasr
Copy link
Member

Thank you@henderkes.

@chalasrchalasr merged commit93ea5f6 intosymfony:7.4Dec 2, 2025
12 checks passed
@henderkeshenderkes deleted the 7.4 branchDecember 2, 2025 07:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhxabbuh approved these changes

@ycerutoycerutoyceruto approved these changes

@chalasrchalasrchalasr approved these changes

+1 more reviewer

@andeskandeskandesk left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.4

Development

Successfully merging this pull request may close these issues.

8 participants

@henderkes@carsonbot@chalasr@andesk@nicolas-grekas@xabbuh@yceruto@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp