diff --git a/composer.json b/composer.json index 9fbe22c3d..66e150798 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,9 @@ "symfony/phpunit-bridge": "^4.4.12|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0" }, + "conflict": { + "composer/semver": "<1.7.2" + }, "autoload": { "psr-4": { "Symfony\\Flex\\": "src" diff --git a/src/Flex.php b/src/Flex.php index a45ce90df..30be50649 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -391,6 +391,10 @@ public function recordOperations(InstallerEvent $event) $versionParser = new VersionParser(); $packages = []; foreach ($this->lock->all() as $name => $info) { + if ('9999999.9999999' === $info['version']) { + // Fix invalid versions found in some lock files + $info['version'] = '99999.9999999'; + } $packages[] = new Package($name, $versionParser->normalize($info['version']), $info['version']); }