diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php
index 897e67d56..b5dc95309 100644
--- a/src/Composer/Installer.php
+++ b/src/Composer/Installer.php
@@ -315,7 +315,7 @@ class Installer
$pool->addRepository($lockedRepository, $aliases);
}
- if (!$installFromLock || !$this->locker->isCompleteFormat()) {
+ if (!$installFromLock) {
$repositories = $this->repositoryManager->getRepositories();
foreach ($repositories as $repository) {
$pool->addRepository($repository, $aliases);
@@ -393,10 +393,6 @@ class Installer
} elseif ($installFromLock) {
$this->io->write('Installing dependencies'.($withDevReqs?' (including require-dev)':'').' from lock file');
- if (!$this->locker->isCompleteFormat($withDevReqs)) {
- $this->io->write('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.');
- }
-
if (!$this->locker->isFresh()) {
$this->io->write('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.');
}
diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php
index e8390816a..4f165ce57 100644
--- a/src/Composer/Package/Locker.php
+++ b/src/Composer/Package/Locker.php
@@ -84,23 +84,6 @@ class Locker
return $this->hash === $lock['hash'];
}
- /**
- * 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.
*
@@ -133,50 +116,7 @@ class Locker
return $packages;
}
- // legacy lock file support
- $repo = $this->repositoryManager->getLocalRepository();
- foreach ($lockedPackages as $info) {
- $resolvedVersion = !empty($info['alias-version']) ? $info['alias-version'] : $info['version'];
-
- // try to find the package in the local repo (best match)
- $package = $repo->findPackage($info['package'], $resolvedVersion);
-
- // try to find the package in any repo
- if (!$package) {
- $package = $this->repositoryManager->findPackage($info['package'], $resolvedVersion);
- }
-
- // try to find the package in any repo (second pass without alias + rebuild alias since it disappeared)
- if (!$package && !empty($info['alias-version'])) {
- $package = $this->repositoryManager->findPackage($info['package'], $info['version']);
- if ($package) {
- $package->setAlias($info['alias-version']);
- $package->setPrettyAlias($info['alias-pretty-version']);
- }
- }
-
- if (!$package) {
- throw new \LogicException(sprintf(
- 'Can not find "%s-%s" package in registered repositories',
- $info['package'], $info['version']
- ));
- }
-
- $package = clone $package;
- if (!empty($info['time'])) {
- $package->setReleaseDate($info['time']);
- }
- if (!empty($info['source-reference'])) {
- $package->setSourceReference($info['source-reference']);
- if (is_callable($package, 'setDistReference')) {
- $package->setDistReference($info['source-reference']);
- }
- }
-
- $packages->addPackage($package);
- }
-
- return $packages;
+ 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.');
}
/**