diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 554b1cdcd..a6b911e07 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -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'); diff --git a/src/Composer/DependencyResolver/Problem.php b/src/Composer/DependencyResolver/Problem.php index 06a2378ab..b3bddb1b0 100644 --- a/src/Composer/DependencyResolver/Problem.php +++ b/src/Composer/DependencyResolver/Problem.php @@ -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"; diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index cd0ffb014..dbfb5f031 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -507,23 +507,25 @@ class Installer } } - $this->io->writeError(sprintf( - "Lock file operations: %d install%s, %d update%s, %d removal%s", - 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( + "Lock file operations: %d install%s, %d update%s, %d removal%s", + 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('Installing dependencies from lock file'.($this->devMode ? ' (including require-dev)' : '').''); + if ($this->config->get('lock')) { + $this->io->writeError('Installing dependencies from lock file'.($this->devMode ? ' (including require-dev)' : '').''); + } $lockedRepository = $this->locker->getLockedRepository($this->devMode);