$this->io->write('<info>Installing dependencies'.($withDevReqs?' (including require-dev)':'').' from lock file</info>');
$this->io->write('<info>Installing dependencies'.($withDevReqs?' (including require-dev)':'').' from lock file</info>');
if (!$this->locker->isCompleteFormat($withDevReqs)) {
$this->io->write('<warning>Warning: Your lock file is in a deprecated format. It will most likely take a *long* time for composer to install dependencies, and may cause dependency solving issues.</warning>');
}
if (!$this->locker->isFresh()) {
if (!$this->locker->isFresh()) {
$this->io->write('<warning>Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.</warning>');
$this->io->write('<warning>Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.</warning>');
* Checks whether the lock file is in the new complete format or not
*
* @return bool
*/
public function isCompleteFormat()
{
$lockData = $this->getLockData();
$lockedPackages = $lockData['packages'];
if (empty($lockedPackages) || isset($lockedPackages[0]['name'])) {
return true;
}
return false;
}
/**
/**
* Searches and returns an array of locked packages, retrieved from registered repositories.
* Searches and returns an array of locked packages, retrieved from registered repositories.
*
*
@ -133,50 +116,7 @@ class Locker
return $packages;
return $packages;
}
}
// legacy lock file support
throw new \RuntimeException('Your composer.lock was created before 2012-09-15, and is not supported anymore. Run "composer update" to generate a new one.');