Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Console] Commands with an alias should not be recognized as ambiguous when using register #31261

Conversation

Simperfit
Copy link
Contributor

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25355
License MIT
Doc PR

I think when passing an alias, it should not be treated as a ambiguous command since it's configured to response to it.

I've pushed a commit that reproduce the bug and with this patch it does work.

@Simperfit
Copy link
Contributor Author

Travis and Appveyor failure are not related.

@nicolas-grekas
Copy link
Member

2.8 is not maintained since a few months now, can you please rebase/retarget 3.4?

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Apr 26, 2019
@Simperfit Simperfit force-pushed the bugfix/console-commands-with-an-alias-should-no-be-ambiguous branch from 4a38b3c to b97f7fa Compare April 26, 2019 07:18
@Simperfit Simperfit changed the base branch from 2.8 to 3.4 April 26, 2019 07:19
@Simperfit Simperfit force-pushed the bugfix/console-commands-with-an-alias-should-no-be-ambiguous branch 3 times, most recently from 7970690 to f375167 Compare April 26, 2019 07:24
@Simperfit
Copy link
Contributor Author

cc @chalasr

@Simperfit
Copy link
Contributor Author

AppVeyor Failure is not related.

@Simperfit Simperfit force-pushed the bugfix/console-commands-with-an-alias-should-no-be-ambiguous branch 2 times, most recently from fa68f1f to d56b88c Compare April 26, 2019 14:31
@Simperfit
Copy link
Contributor Author

Status: Needs Review

@Simperfit
Copy link
Contributor Author

@chalasr ready for another round of review

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

LGTM for the bugfix part.

src/Symfony/Component/Console/Application.php Outdated Show resolved Hide resolved
@Simperfit
Copy link
Contributor Author

@chalasr done

Status: Needs Review.

@nicolas-grekas
Copy link
Member

Thank you @Simperfit.

@nicolas-grekas nicolas-grekas merged commit ae7ee46 into symfony:3.4 May 9, 2019
nicolas-grekas added a commit that referenced this pull request May 9, 2019
…as ambiguous when using register (Simperfit)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Commands with an alias should not be recognized as ambiguous when using register

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25355
| License       | MIT
| Doc PR        |

I think when passing an alias, it should not be treated as a ambiguous command since it's configured to response to it.

I've [pushed a commit](Simperfit/symfony-reproducer@2f5209a) that reproduce the bug and with this patch it does work.

Commits
-------

ae7ee46 [Console] Commands with an alias should not be recognized as ambiguous
@Simperfit Simperfit deleted the bugfix/console-commands-with-an-alias-should-no-be-ambiguous branch May 9, 2019 17:00
chalasr pushed a commit that referenced this pull request May 14, 2019
…(Simperfit)

This PR was submitted for the 4.3 branch but it was merged into the 4.4-dev branch instead (closes #31420).

Discussion
----------

[Console] optimisation getting the command when finding

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Following discussion with @chalasr in here #31261 (comment), first commit will be deleted  when the other PR is merged.

Commits
-------

3d6b303 [Console] Optimisation on getting the command
This was referenced May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants