1
0
Fork 0

Rename method

pull/1109/head
Jordi Boggiano 2012-09-14 17:49:03 +02:00
parent 418e876e8a
commit 536563dc2a
2 changed files with 5 additions and 5 deletions

View File

@ -258,7 +258,7 @@ class Installer
$pool->addRepository($lockedRepository, $aliases); $pool->addRepository($lockedRepository, $aliases);
} }
if (!$installFromLock || $this->locker->isLegacyFormat($devMode)) { if (!$installFromLock || !$this->locker->isCompleteFormat($devMode)) {
$repositories = $this->repositoryManager->getRepositories(); $repositories = $this->repositoryManager->getRepositories();
foreach ($repositories as $repository) { foreach ($repositories as $repository) {
$pool->addRepository($repository, $aliases); $pool->addRepository($repository, $aliases);

View File

@ -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 * @param bool $dev true to check in dev mode
* @return bool * @return bool
*/ */
public function isLegacyFormat($dev) public function isCompleteFormat($dev)
{ {
$lockData = $this->getLockData(); $lockData = $this->getLockData();
$lockedPackages = $dev ? $lockData['packages-dev'] : $lockData['packages']; $lockedPackages = $dev ? $lockData['packages-dev'] : $lockData['packages'];
if (empty($lockedPackages) || isset($lockedPackages[0]['name'])) { if (empty($lockedPackages) || isset($lockedPackages[0]['name'])) {
return false; return true;
} }
return true; return false;
} }
/** /**