Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #25407 [Console] Commands with an alias should not be recognized …
…as ambiguous (Simperfit) This PR was merged into the 2.7 branch. Discussion ---------- [Console] Commands with an alias should not be recognized as ambiguous | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | no | Fixed tickets | no <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | When having two commands with the same starting name and an alias equal to the starting name, we should not have an ambiguous error because we are setting the alias. Commits ------- 863f632 [Console] Commands with an alias should not be recognized as ambiguous
- Loading branch information
Showing
4 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class TestTiti extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this | ||
->setName('test-titi') | ||
->setDescription('The test:titi command') | ||
; | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$output->write('test-titi'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class TestToto extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this | ||
->setName('test-toto') | ||
->setDescription('The test-toto command') | ||
->setAliases(array('test')) | ||
; | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$output->write('test-toto'); | ||
} | ||
} |