Skip to content

Commit 543443a

Browse files
Fix invalid version string "9999999.9999999"
1 parent 33ce7c1 commit 543443a

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": "^4.4.12|^5.0|^6.0",
2222
"symfony/process": "^4.4|^5.0|^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
@@ -391,6 +391,10 @@ public function recordOperations(InstallerEvent $event)
391391
$versionParser = new VersionParser();
392392
$packages = [];
393393
foreach ($this->lock->all() as $name => $info) {
394+
if ('9999999.9999999' === $info['version']) {
395+
// Fix invalid versions found in some lock files
396+
$info['version'] = '99999.9999999';
397+
}
394398
$packages[] = new Package($name, $versionParser->normalize($info['version']), $info['version']);
395399
}
396400

0 commit comments

Comments
 (0)