Skip to content

Commit

Permalink
Merge pull request #74 from ghostwriter/bugfix/normalize-composer-ver…
Browse files Browse the repository at this point in the history
…sion

Normalize composer version range
  • Loading branch information
Ocramius authored Jan 20, 2022
2 parents ca94c95 + 9d9310d commit a380ce3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ function gatherVersions(composerJson) {
}

let versions = [];
let composerPhpVersion = composerJson['require']['php'].replace(/,\s/i, ' ');

INSTALLABLE_VERSIONS.forEach(function (version) {
if (semver.satisfies(version + '.0', composerJson['require']['php'])) {
if (semver.satisfies(version + '.0', composerPhpVersion)) {
versions.push(version);
}
});
Expand Down

0 comments on commit a380ce3

Please sign in to comment.