Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #23869 [Console] Made console command shortcuts case insensit…
…ive (thanosp) This PR was merged into the 3.4 branch. Discussion ---------- [Console] Made console command shortcuts case insensitive | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> <!-- - 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 3.4, legacy code removals go to the master branch. - Please fill in this template according to the PR you're about to submit. - Replace this comment by a description of what your PR is solving. --> This patch would save a lot of time wasted correcting typos. Symfony commands are using `:` as a namespace separator. Most keyboards require pressing shift to get this character. As an accident a developer in hurry (me) when trying to use the shortcut of commands will often type the character after `:` also while pressing shift. Right now this will lead to an error effectively wasting the attempt to save time by using the shortcut. e.g. `bin/console c:C` Commits ------- 04df283 [Console] Added a case-insensitive fallback for console command names
- Loading branch information
Showing
5 changed files
with
68 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
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
11 changes: 11 additions & 0 deletions
11
src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseLowercaseCommand.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,11 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
|
||
class FooSameCaseLowercaseCommand extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setName('foo:bar')->setDescription('foo:bar command'); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseUppercaseCommand.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,11 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
|
||
class FooSameCaseUppercaseCommand extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setName('foo:BAR')->setDescription('foo:BAR command'); | ||
} | ||
} |