Skip to content

Commit

Permalink
Merge pull request #22 from zaporylie/issue/18
Browse files Browse the repository at this point in the history
Fix #18: Do not depend on symfony branch alias
  • Loading branch information
zaporylie authored Oct 6, 2020
2 parents fb231d9 + c8c6ed6 commit 0d6ebd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public function removeLegacyTags(array $data)
$packages = [];
$specificPackage = $data['packages'][$packageName];
foreach ($specificPackage as $version => $composerJson) {
if ('dev-master' === $version) {
$normalizedVersion = $this->versionParser->normalize($composerJson['extra']['branch-alias']['dev-master']);
} else {
$normalizedVersion = $composerJson['version_normalized'];
if (null !== $alias = (isset($composerJson['extra']['branch-alias'][$version]) ? $composerJson['extra']['branch-alias'][$version] : null)) {
$normalizedVersion = $this->versionParser->normalize($alias);
} elseif (null === $normalizedVersion = isset($composerJson['version_normalized']) ? $composerJson['version_normalized'] : null) {
continue;
}
$packageConstraint = $this->versionParser->parseConstraints($packageVersionConstraint);
$versionConstraint = new Constraint('==', $normalizedVersion);
Expand Down

0 comments on commit 0d6ebd8

Please sign in to comment.