Remove support for the first version of the compression algo (#7906)
parent
177f21ec5c
commit
2e204b0161
|
@ -62,32 +62,10 @@ class ArrayLoader implements LoaderInterface
|
|||
|
||||
public function loadPackages(array $versions, $class)
|
||||
{
|
||||
static $uniqKeys = array('version', 'version_normalized', 'source', 'dist', 'time');
|
||||
|
||||
$packages = array();
|
||||
$linkCache = array();
|
||||
|
||||
foreach ($versions as $version) {
|
||||
if (isset($version['versions'])) {
|
||||
$baseVersion = $version;
|
||||
foreach ($uniqKeys as $key) {
|
||||
unset($baseVersion[$key.'s']);
|
||||
}
|
||||
|
||||
foreach ($version['versions'] as $index => $dummy) {
|
||||
$unpackedVersion = $baseVersion;
|
||||
foreach ($uniqKeys as $key) {
|
||||
$unpackedVersion[$key] = $version[$key.'s'][$index];
|
||||
}
|
||||
|
||||
$package = $this->createObject($unpackedVersion, $class);
|
||||
|
||||
$this->configureCachedLinks($linkCache, $package, $unpackedVersion);
|
||||
$package = $this->configureObject($package, $unpackedVersion);
|
||||
|
||||
$packages[] = $package;
|
||||
}
|
||||
} else {
|
||||
$package = $this->createObject($version, $class);
|
||||
|
||||
$this->configureCachedLinks($linkCache, $package, $version);
|
||||
|
@ -95,7 +73,6 @@ class ArrayLoader implements LoaderInterface
|
|||
|
||||
$packages[] = $package;
|
||||
}
|
||||
}
|
||||
|
||||
return $packages;
|
||||
}
|
||||
|
|
|
@ -645,21 +645,8 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
unset($expanded, $expandedVersion, $versionData);
|
||||
}
|
||||
|
||||
static $uniqKeys = array('version', 'version_normalized', 'source', 'dist', 'time');
|
||||
$versionsToLoad = array();
|
||||
foreach ($versions as $version) {
|
||||
if (isset($version['version_normalizeds'])) {
|
||||
foreach ($version['version_normalizeds'] as $index => $normalizedVersion) {
|
||||
if (!$repo->isVersionAcceptable($isPackageAcceptableCallable, $constraint, $realName, $normalizedVersion)) {
|
||||
foreach ($uniqKeys as $key) {
|
||||
unset($version[$key.'s'][$index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($version['version_normalizeds'])) {
|
||||
$versionsToLoad[] = $version;
|
||||
}
|
||||
} else {
|
||||
if (!isset($version['version_normalized'])) {
|
||||
$version['version_normalized'] = $repo->versionParser->normalize($version['version']);
|
||||
}
|
||||
|
@ -668,7 +655,6 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
$versionsToLoad[] = $version;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$loadedPackages = $repo->createPackages($versionsToLoad, 'Composer\Package\CompletePackage');
|
||||
foreach ($loadedPackages as $package) {
|
||||
|
|
Loading…
Reference in New Issue