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,23 +507,25 @@ class Installer
}
}
$this->io->writeError(sprintf(
"<info>Lock file operations: %d install%s, %d update%s, %d removal%s</info>",
count($installNames),
1 === count($installNames) ? '' : 's',
count($updateNames),
1 === count($updateNames) ? '' : 's',
count($uninstalls),
1 === count($uninstalls) ? '' : 's'
));
if ($installNames) {
$this->io->writeError("Installs: ".implode(', ', $installNames), true, IOInterface::VERBOSE);
}
if ($updateNames) {
$this->io->writeError("Updates: ".implode(', ', $updateNames), true, IOInterface::VERBOSE);
}
if ($uninstalls) {
$this->io->writeError("Removals: ".implode(', ', $uninstallNames), true, IOInterface::VERBOSE);
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),
1 === count($installNames) ? '' : 's',
count($updateNames),
1 === count($updateNames) ? '' : 's',
count($uninstalls),
1 === count($uninstalls) ? '' : 's'
));
if ($installNames) {
$this->io->writeError("Installs: ".implode(', ', $installNames), true, IOInterface::VERBOSE);
}
if ($updateNames) {
$this->io->writeError("Updates: ".implode(', ', $updateNames), true, IOInterface::VERBOSE);
}
if ($uninstalls) {
$this->io->writeError("Removals: ".implode(', ', $uninstallNames), true, IOInterface::VERBOSE);
}
}
}
@ -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
{
$this->io->writeError('<info>Installing dependencies from lock file'.($this->devMode ? ' (including require-dev)' : '').'</info>');
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);