diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index ed405a644..52e825f53 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -258,7 +258,7 @@ class Installer $pool->addRepository($lockedRepository, $aliases); } - if (!$installFromLock || $this->locker->isLegacyFormat($devMode)) { + if (!$installFromLock || !$this->locker->isCompleteFormat($devMode)) { $repositories = $this->repositoryManager->getRepositories(); foreach ($repositories as $repository) { $pool->addRepository($repository, $aliases); diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index 3036f904c..ea190636f 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -88,21 +88,21 @@ class Locker } /** - * Checks whether the lock file is in the legacy format + * Checks whether the lock file is in the new complete format or not * * @param bool $dev true to check in dev mode * @return bool */ - public function isLegacyFormat($dev) + public function isCompleteFormat($dev) { $lockData = $this->getLockData(); $lockedPackages = $dev ? $lockData['packages-dev'] : $lockData['packages']; if (empty($lockedPackages) || isset($lockedPackages[0]['name'])) { - return false; + return true; } - return true; + return false; } /**