Skip to content

Commit 92f4fba

Browse files
Merge branch '1.x' into 2.x
* 1.x: Fix invalid version string "9999999.9999999"
2 parents aae706c + bda5f86 commit 92f4fba

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"symfony/phpunit-bridge": "^5.4|^6.0",
2222
"symfony/process": "^5.4|^6.0"
2323
},
24+
"conflict": {
25+
"composer/semver": "<1.7.2"
26+
},
2427
"autoload": {
2528
"psr-4": {
2629
"Symfony\\Flex\\": "src"

src/Flex.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ public function recordOperations(InstallerEvent $event)
293293
$versionParser = new VersionParser();
294294
$packages = [];
295295
foreach ($this->lock->all() as $name => $info) {
296+
if ('9999999.9999999' === $info['version']) {
297+
// Fix invalid versions found in some lock files
298+
$info['version'] = '99999.9999999';
299+
}
296300
$packages[] = new Package($name, $versionParser->normalize($info['version']), $info['version']);
297301
}
298302

0 commit comments

Comments
 (0)