Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a19c6ae

Browse filesBrowse files
[travis] fix composer.lock invalidation for PRs patching several components
1 parent f003c59 commit a19c6ae
Copy full SHA for a19c6ae

File tree

Expand file treeCollapse file tree

1 file changed

+10
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-2
lines changed

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

Copy file name to clipboardExpand all lines: .github/rm-invalid-lowest-lock-files.php
+10-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.