1
0
Fork 0

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

pull/10688/head
Jordi Boggiano 2022-03-31 14:42:08 +02:00
parent 90571a8c9d
commit 2b99d069b2
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 8 deletions

View File

@ -198,7 +198,6 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
$package['dist']['reference'] = trim($output); $package['dist']['reference'] = trim($output);
} }
$needsAlias = false;
if (!isset($package['version'])) { if (!isset($package['version'])) {
$versionData = $this->versionGuesser->guessVersion($package, $path); $versionData = $this->versionGuesser->guessVersion($package, $path);
if (is_array($versionData) && $versionData['pretty_version']) { if (is_array($versionData) && $versionData['pretty_version']) {
@ -211,16 +210,10 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
$package['version'] = $versionData['pretty_version']; $package['version'] = $versionData['pretty_version'];
} else { } else {
$package['version'] = 'dev-main'; $package['version'] = 'dev-main';
$needsAlias = true;
} }
} }
$package = $this->loader->load($package); $this->addPackage($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);
} }
} }