Skip to content

Commit

Permalink
Fix dealing with locally patched packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 5, 2019
1 parent bc7390d commit 42bdc9f
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 @@ -66,7 +66,7 @@ public function read($file)

public function removeLegacyTags(array $data): array
{
if (!$this->symfonyConstraints) {
if (!$this->symfonyConstraints || !isset($data['packages'])) {
return $data;
}

Expand All @@ -78,6 +78,8 @@ public function removeLegacyTags(array $data): array
foreach ($versions as $version => $composerJson) {
if ('dev-master' === $version) {
$normalizedVersion = $this->versionParser->normalize($devMasterAlias);
} elseif (!isset($composerJson['version_normalized'])) {
continue;
} else {
$normalizedVersion = $composerJson['version_normalized'];
}
Expand All @@ -97,6 +99,8 @@ public function removeLegacyTags(array $data): array
foreach ($symfonySymfony as $version => $composerJson) {
if ('dev-master' === $version) {
$normalizedVersion = $this->versionParser->normalize($composerJson['extra']['branch-alias']['dev-master']);
} elseif (!isset($composerJson['version_normalized'])) {
continue;
} else {
$normalizedVersion = $composerJson['version_normalized'];
}
Expand Down

0 comments on commit 42bdc9f

Please sign in to comment.