Add output to remove/require command to highlight the fact it is running an update command, refs #8910
parent
af6444353f
commit
1d2df5ef55
|
@ -191,6 +191,8 @@ EOT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$io->writeError('<info>'.$file.' has been updated</info>');
|
||||||
|
|
||||||
if ($input->getOption('no-update')) {
|
if ($input->getOption('no-update')) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -225,12 +227,17 @@ EOT
|
||||||
$apcu = $input->getOption('apcu-autoloader') || $composer->getConfig()->get('apcu-autoloader');
|
$apcu = $input->getOption('apcu-autoloader') || $composer->getConfig()->get('apcu-autoloader');
|
||||||
|
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS_NO_ROOT_REQUIRE;
|
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS_NO_ROOT_REQUIRE;
|
||||||
|
$flags = '';
|
||||||
if ($input->getOption('update-with-all-dependencies') || $input->getOption('with-all-dependencies')) {
|
if ($input->getOption('update-with-all-dependencies') || $input->getOption('with-all-dependencies')) {
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS;
|
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS;
|
||||||
|
$flags .= ' --with-all-dependencies';
|
||||||
} elseif ($input->getOption('no-update-with-dependencies')) {
|
} elseif ($input->getOption('no-update-with-dependencies')) {
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_ONLY_LISTED;
|
$updateAllowTransitiveDependencies = Request::UPDATE_ONLY_LISTED;
|
||||||
|
$flags .= ' --with-dependencies';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$io->writeError('<info>Running composer update '.implode(' ', $packages).$flags);
|
||||||
|
|
||||||
$install
|
$install
|
||||||
->setVerbose($input->getOption('verbose'))
|
->setVerbose($input->getOption('verbose'))
|
||||||
->setDevMode($updateDevMode)
|
->setDevMode($updateDevMode)
|
||||||
|
|
|
@ -264,18 +264,24 @@ EOT
|
||||||
$rootPackage->setDevRequires($links['require-dev']);
|
$rootPackage->setDevRequires($links['require-dev']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$updateDevMode = !$input->getOption('update-no-dev');
|
$updateDevMode = !$input->getOption('update-no-dev');
|
||||||
$optimize = $input->getOption('optimize-autoloader') || $composer->getConfig()->get('optimize-autoloader');
|
$optimize = $input->getOption('optimize-autoloader') || $composer->getConfig()->get('optimize-autoloader');
|
||||||
$authoritative = $input->getOption('classmap-authoritative') || $composer->getConfig()->get('classmap-authoritative');
|
$authoritative = $input->getOption('classmap-authoritative') || $composer->getConfig()->get('classmap-authoritative');
|
||||||
$apcu = $input->getOption('apcu-autoloader') || $composer->getConfig()->get('apcu-autoloader');
|
$apcu = $input->getOption('apcu-autoloader') || $composer->getConfig()->get('apcu-autoloader');
|
||||||
|
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_ONLY_LISTED;
|
$updateAllowTransitiveDependencies = Request::UPDATE_ONLY_LISTED;
|
||||||
|
$flags = '';
|
||||||
if ($input->getOption('update-with-all-dependencies') || $input->getOption('with-all-dependencies')) {
|
if ($input->getOption('update-with-all-dependencies') || $input->getOption('with-all-dependencies')) {
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS;
|
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS;
|
||||||
|
$flags .= ' --with-all-dependencies';
|
||||||
} elseif ($input->getOption('update-with-dependencies') || $input->getOption('with-dependencies')) {
|
} elseif ($input->getOption('update-with-dependencies') || $input->getOption('with-dependencies')) {
|
||||||
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS_NO_ROOT_REQUIRE;
|
$updateAllowTransitiveDependencies = Request::UPDATE_LISTED_WITH_TRANSITIVE_DEPS_NO_ROOT_REQUIRE;
|
||||||
|
$flags .= ' --with-dependencies';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$io->writeError('<info>Running composer update '.implode(' ', array_keys($requirements)).$flags);
|
||||||
|
|
||||||
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'require', $input, $output);
|
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'require', $input, $output);
|
||||||
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue