Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"

This reverts commit ccc93678fd, reversing
changes made to e77545ab8d.
This commit is contained in:
Fabien Potencier 2018-01-26 16:23:25 +01:00
parent 554bc2482e
commit 667b9295f8
2 changed files with 0 additions and 5 deletions

View File

@ -284,8 +284,6 @@ class ArgvInput extends Input
}
if (0 === strpos($token, '-') && 0 !== strpos($token, '--')) {
$noValue = explode('=', $token);
$token = $noValue[0];
$searchableToken = str_replace('-', '', $token);
$searchableValue = str_replace('-', '', $value);
if ('' !== $searchableToken && '' !== $searchableValue && false !== strpos($searchableToken, $searchableValue)) {

View File

@ -299,9 +299,6 @@ class ArgvInputTest extends TestCase
$input = new ArgvInput(array('cli.php', '-fh'));
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
$input = new ArgvInput(array('cli.php', '-e=test'));
$this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input');
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');