From 2b99d069b22557cf87f3caacfb50251e3cf6c2ee Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 31 Mar 2022 14:42:08 +0200 Subject: [PATCH] Remove dev-master=>dev-main alias from #10372 as it does not work/is missing when reloading from lock file and extracting dev deps, refs #10651 --- src/Composer/Repository/PathRepository.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php index d2a81cee7..3335f0a79 100644 --- a/src/Composer/Repository/PathRepository.php +++ b/src/Composer/Repository/PathRepository.php @@ -198,7 +198,6 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn $package['dist']['reference'] = trim($output); } - $needsAlias = false; if (!isset($package['version'])) { $versionData = $this->versionGuesser->guessVersion($package, $path); if (is_array($versionData) && $versionData['pretty_version']) { @@ -211,16 +210,10 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn $package['version'] = $versionData['pretty_version']; } else { $package['version'] = 'dev-main'; - $needsAlias = true; } } - $package = $this->loader->load($package); - if ($needsAlias && $package instanceof CompletePackage) { - // keep a dev-master alias to dev-main for BC - $package = new CompleteAliasPackage($package, 'dev-master', 'dev-master'); - } - $this->addPackage($package); + $this->addPackage($this->loader->load($package)); } }