Closed vleonov closed 6 years ago
I don't think it's unusual but maybe we can make it optional. Inside the configure() method for a given command, we can set this option. By default, it's still case-sensitive.
protected function configure() {
$this->setName('help');
$this->setCaseInsensitive(true); // Now it works with help, Help and HELP
}
What do you think ?
Well, why not? This solution would work fine.
Current implemenation of Command is case-sensitive. E.g. if I register a command
help
, I should send exact commandhelp
, but notHelp
orHELP
. It's unusual.So, why don't make it case-insensitive by adding modifier
i
insidegetCommand
method?This
$find = '/^'.preg_quote($commandName).'/';
Change to this$find = '/^'.preg_quote($commandName).'/i';