8000 Merge branch '2.8' into 3.4 · symfony/symfony@817e7cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 817e7cd

Browse files
Merge branch '2.8' into 3.4
* 2.8: [travis] fix composer.lock invalidation for PRs patching several components
2 parents b08dcfc + 48c531c commit 817e7cd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/rm-invalid-lowest-lock-files.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ function getContentHash(array $composerJson)
7979
continue 2;
8080
}
8181

82-
foreach (array('minimum-stability', 'prefer-stable', 'repositories') as $key) {
82+
if (isset($composerJsons[$name][2]['repositories']) && !isset($lockedJson[$key]['repositories'])) {
83+
// the locked package has been patched locally but the lock references a commit,
84+
// which means the referencing package itself is not modified
85+
continue;
86+
}
87+
88+
foreach (array('minimum-stability', 'prefer-stable') as $key) {
8389
if (array_key_exists($key, $composerJsons[$name][2])) {
8490
$lockedJson[$key] = $composerJsons[$name][2][$key];
8591
}
@@ -92,7 +98,9 @@ function getContentHash(array $composerJson)
9298
continue 2;
9399
}
94100

95-
$referencedCommits[$name][$lockedJson['source']['reference']][] = $dir;
101+
if ($lockedJson['dist']['reference']) {
102+
$referencedCommits[$name][$lockedJson['dist']['reference']][] = $dir;
103+
}
96104
}
97105
}
98106

0 commit comments

Comments
 (0)
0