Fix inconsistent parameter names in inheritance trees
parent
38813e10f7
commit
20e410f3a2
|
@ -476,7 +476,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
* @inheritDoc
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function getLocalChanges(PackageInterface $package, string $targetDir): ?string
|
||||
public function getLocalChanges(PackageInterface $package, string $path): ?string
|
||||
{
|
||||
$prevIO = $this->io;
|
||||
|
||||
|
@ -485,7 +485,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
$e = null;
|
||||
$output = '';
|
||||
|
||||
$targetDir = Filesystem::trimTrailingSlash($targetDir);
|
||||
$targetDir = Filesystem::trimTrailingSlash($path);
|
||||
try {
|
||||
if (is_dir($targetDir.'_compare')) {
|
||||
$this->filesystem->removeDirectory($targetDir.'_compare');
|
||||
|
|
|
@ -91,21 +91,21 @@ class RootAliasPackage extends CompleteAliasPackage implements RootPackageInterf
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setRequires(array $require): void
|
||||
public function setRequires(array $requires): void
|
||||
{
|
||||
$this->requires = $this->replaceSelfVersionDependencies($require, Link::TYPE_REQUIRE);
|
||||
$this->requires = $this->replaceSelfVersionDependencies($requires, Link::TYPE_REQUIRE);
|
||||
|
||||
$this->aliasOf->setRequires($require);
|
||||
$this->aliasOf->setRequires($requires);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setDevRequires(array $devRequire): void
|
||||
public function setDevRequires(array $devRequires): void
|
||||
{
|
||||
$this->devRequires = $this->replaceSelfVersionDependencies($devRequire, Link::TYPE_DEV_REQUIRE);
|
||||
$this->devRequires = $this->replaceSelfVersionDependencies($devRequires, Link::TYPE_DEV_REQUIRE);
|
||||
|
||||
$this->aliasOf->setDevRequires($devRequire);
|
||||
$this->aliasOf->setDevRequires($devRequires);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,16 +57,16 @@ class ArrayRepository implements RepositoryInterface
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function loadPackages(array $packageMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array())
|
||||
public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array())
|
||||
{
|
||||
$packages = $this->getPackages();
|
||||
|
||||
$result = array();
|
||||
$namesFound = array();
|
||||
foreach ($packages as $package) {
|
||||
if (array_key_exists($package->getName(), $packageMap)) {
|
||||
if (array_key_exists($package->getName(), $packageNameMap)) {
|
||||
if (
|
||||
(!$packageMap[$package->getName()] || $packageMap[$package->getName()]->matches(new Constraint('==', $package->getVersion())))
|
||||
(!$packageNameMap[$package->getName()] || $packageNameMap[$package->getName()]->matches(new Constraint('==', $package->getVersion())))
|
||||
&& StabilityFilter::isPackageAcceptable($acceptableStabilities, $stabilityFlags, $package->getNames(), $package->getStability())
|
||||
&& !isset($alreadyLoaded[$package->getName()][$package->getVersion()])
|
||||
) {
|
||||
|
|
|
@ -105,13 +105,13 @@ class CompositeRepository implements RepositoryInterface
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function loadPackages(array $packageMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array()): array
|
||||
public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array()): array
|
||||
{
|
||||
$packages = array();
|
||||
$namesFound = array();
|
||||
foreach ($this->repositories as $repository) {
|
||||
/* @var $repository RepositoryInterface */
|
||||
$result = $repository->loadPackages($packageMap, $acceptableStabilities, $stabilityFlags, $alreadyLoaded);
|
||||
$result = $repository->loadPackages($packageNameMap, $acceptableStabilities, $stabilityFlags, $alreadyLoaded);
|
||||
$packages[] = $result['packages'];
|
||||
$namesFound[] = $result['namesFound'];
|
||||
}
|
||||
|
|
|
@ -112,19 +112,19 @@ class FilterRepository implements RepositoryInterface
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function loadPackages(array $packageMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array()): array
|
||||
public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = array()): array
|
||||
{
|
||||
foreach ($packageMap as $name => $constraint) {
|
||||
foreach ($packageNameMap as $name => $constraint) {
|
||||
if (!$this->isAllowed($name)) {
|
||||
unset($packageMap[$name]);
|
||||
unset($packageNameMap[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$packageMap) {
|
||||
if (!$packageNameMap) {
|
||||
return array('namesFound' => array(), 'packages' => array());
|
||||
}
|
||||
|
||||
$result = $this->repo->loadPackages($packageMap, $acceptableStabilities, $stabilityFlags, $alreadyLoaded);
|
||||
$result = $this->repo->loadPackages($packageNameMap, $acceptableStabilities, $stabilityFlags, $alreadyLoaded);
|
||||
if (!$this->canonical) {
|
||||
$result['namesFound'] = array();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue