Remove support for the first version of the compression algo (#7906)
parent
177f21ec5c
commit
2e204b0161
|
@ -62,39 +62,16 @@ 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']);
|
||||
}
|
||||
$package = $this->createObject($version, $class);
|
||||
|
||||
foreach ($version['versions'] as $index => $dummy) {
|
||||
$unpackedVersion = $baseVersion;
|
||||
foreach ($uniqKeys as $key) {
|
||||
$unpackedVersion[$key] = $version[$key.'s'][$index];
|
||||
}
|
||||
$this->configureCachedLinks($linkCache, $package, $version);
|
||||
$package = $this->configureObject($package, $version);
|
||||
|
||||
$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);
|
||||
$package = $this->configureObject($package, $version);
|
||||
|
||||
$packages[] = $package;
|
||||
}
|
||||
$packages[] = $package;
|
||||
}
|
||||
|
||||
return $packages;
|
||||
|
|
|
@ -645,28 +645,14 @@ 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']);
|
||||
}
|
||||
if (!isset($version['version_normalized'])) {
|
||||
$version['version_normalized'] = $repo->versionParser->normalize($version['version']);
|
||||
}
|
||||
|
||||
if ($repo->isVersionAcceptable($isPackageAcceptableCallable, $constraint, $realName, $version['version_normalized'])) {
|
||||
$versionsToLoad[] = $version;
|
||||
}
|
||||
if ($repo->isVersionAcceptable($isPackageAcceptableCallable, $constraint, $realName, $version['version_normalized'])) {
|
||||
$versionsToLoad[] = $version;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue