From 8b5254688ce94d8e26536c34a4ecf0439d30ead9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 16 Feb 2022 15:13:21 +0100 Subject: [PATCH] Drop early package name validation if a version is provided to require/init command, fixes #10489 --- src/Composer/Command/InitCommand.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 30ef1fd0c..55d966d31 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -543,12 +543,6 @@ EOT $requirement['version'], $requirement['name'] )); - } else { - // check that the specified version/constraint exists before we proceed - list($name) = $this->findBestVersionAndNameForPackage($input, $requirement['name'], $platformRepo, $preferredStability, $checkProvidedVersions ? $requirement['version'] : null, 'dev', $fixed); - - // replace package name from packagist.org - $requirement['name'] = $name; } $result[] = $requirement['name'] . ' ' . $requirement['version'];