1
0
Fork 0

Merge branch '2.2' into main

pull/10769/head
Jordi Boggiano 2022-05-11 10:16:11 +02:00
commit efbc0ddb78
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 26 additions and 22 deletions

View File

@ -883,7 +883,7 @@ EXT_CHECKS;
// platform_check.php @generated by Composer
\$issues = array();
${requiredPhp}${requiredExtensions}
{$requiredPhp}{$requiredExtensions}
if (\$issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');

View File

@ -363,7 +363,7 @@ class Problem
$providersStr = implode(array_map(function ($p): string {
$description = $p['description'] ? ' '.substr($p['description'], 0, 100) : '';
return " - ${p['name']}".$description."\n";
return ' - '.$p['name'].$description."\n";
}, count($providers) > $maxProviders + 1 ? array_slice($providers, 0, $maxProviders) : $providers));
if (count($providers) > $maxProviders + 1) {
$providersStr .= ' ... and '.(count($providers) - $maxProviders).' more.'."\n";

View File

@ -507,6 +507,7 @@ class Installer
}
}
if ($this->config->get('lock')) {
$this->io->writeError(sprintf(
"<info>Lock file operations: %d install%s, %d update%s, %d removal%s</info>",
count($installNames),
@ -526,6 +527,7 @@ class Installer
$this->io->writeError("Removals: ".implode(', ', $uninstallNames), true, IOInterface::VERBOSE);
}
}
}
$sortByName = function ($a, $b): int {
if ($a instanceof UpdateOperation) {
@ -550,8 +552,8 @@ class Installer
$this->suggestedPackagesReporter->addSuggestionsFromPackage($operation->getPackage());
}
// output op, but alias op only in debug verbosity
if (false === strpos($operation->getOperationType(), 'Alias') || $this->io->isDebug()) {
// output op if lock file is enabled, but alias op only in debug verbosity
if ($this->config->get('lock') && (false === strpos($operation->getOperationType(), 'Alias') || $this->io->isDebug())) {
$this->io->writeError(' - ' . $operation->show(true));
}
}
@ -655,7 +657,9 @@ class Installer
*/
protected function doInstall(InstalledRepositoryInterface $localRepo, bool $alreadySolved = false): int
{
if ($this->config->get('lock')) {
$this->io->writeError('<info>Installing dependencies from lock file'.($this->devMode ? ' (including require-dev)' : '').'</info>');
}
$lockedRepository = $this->locker->getLockedRepository($this->devMode);