Skip to content

Commit

Permalink
Fix restricting versions of components that have no master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 27, 2019
1 parent 20951ca commit 6b14e1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ public function removeLegacyTags(array $data): array
}

foreach ($data['packages'] as $name => $versions) {
if (!isset($this->versions['splits'][$name]) || null === $devMasterAlias = $versions['dev-master']['extra']['branch-alias']['dev-master'] ?? null) {
if (!isset($this->versions['splits'][$name])) {
continue;
}

foreach ($versions as $version => $composerJson) {
if ('dev-master' === $version) {
if (null === $devMasterAlias = $versions['dev-master']['extra']['branch-alias']['dev-master'] ?? null) {
continue;
}

$normalizedVersion = $this->versionParser->normalize($devMasterAlias);
} elseif (!isset($composerJson['version_normalized'])) {
continue;
Expand Down

0 comments on commit 6b14e1f

Please sign in to comment.