You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Application.php
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -513,6 +513,11 @@ public function get($name)
513
513
thrownewCommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
514
514
}
515
515
516
+
// When the command has a different name than the one used at the command loader level
517
+
if (!isset($this->commands[$name])) {
518
+
thrownewCommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
$this->expectExceptionMessage('The "test" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".');
0 commit comments