if (!$input->hasParameterOption('--no-plugins') && !$this->hasPluginCommands && 'global' !== $commandName) {
foreach ($this->getPluginCommands() as $command) {
if ($this->has($command->getName())) {
$io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>');
} else {
$this->add($command);
}
}
$this->hasPluginCommands = true;
}
// determine command name to be executed incl plugin commands, and check if it's a proxy command
@ -197,16 +219,6 @@ class Application extends BaseApplication
$this->io->enableDebugging($startTime);
}
if (!$input->hasParameterOption('--no-plugins') && !$isProxyCommand) {
foreach ($this->getPluginCommands() as $command) {
if ($this->has($command->getName())) {
$io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>');