Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #33748 [Console] Do not include hidden commands in suggested alte…
…rnatives (m-vo) This PR was merged into the 3.4 branch. Discussion ---------- [Console] Do not include hidden commands in suggested alternatives | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #33398 | License | MIT | Doc PR | n/a Partially backports #33412 on 3.4, avoids leaking the names of hidden commands in suggested alternatives on command not found. Commits ------- 8a9d173 Do not include hidden commands in suggested alternatives
- Loading branch information
Showing
3 changed files
with
40 additions
and
3 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
21 changes: 21 additions & 0 deletions
21
src/Symfony/Component/Console/Tests/Fixtures/FooHiddenCommand.php
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 FooHiddenCommand extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this | ||
->setName('foo:hidden') | ||
->setAliases(['afoohidden']) | ||
->setHidden(true) | ||
; | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
} | ||
} |