Fix CS
parent
10e634890e
commit
4c9e75c6e5
|
@ -133,7 +133,7 @@ EOT
|
||||||
$options['autoload'] = (object) array(
|
$options['autoload'] = (object) array(
|
||||||
'psr-4' => array(
|
'psr-4' => array(
|
||||||
$namespace . '\\' => $autoloadPath,
|
$namespace . '\\' => $autoloadPath,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,6 @@ EOT
|
||||||
$autoload
|
$autoload
|
||||||
);
|
);
|
||||||
$input->setOption('autoload', $autoload);
|
$input->setOption('autoload', $autoload);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -673,9 +672,10 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
$namespace = array_map(
|
$namespace = array_map(
|
||||||
function($part) {
|
function ($part) {
|
||||||
$part = preg_replace('/[^a-z0-9]/i', ' ', $part);
|
$part = preg_replace('/[^a-z0-9]/i', ' ', $part);
|
||||||
$part = ucwords($part);
|
$part = ucwords($part);
|
||||||
|
|
||||||
return str_replace(' ', '', $part);
|
return str_replace(' ', '', $part);
|
||||||
},
|
},
|
||||||
explode('/', $packageName)
|
explode('/', $packageName)
|
||||||
|
|
|
@ -91,6 +91,7 @@ EOT
|
||||||
|
|
||||||
if (!$packagesToReinstall) {
|
if (!$packagesToReinstall) {
|
||||||
$io->writeError('<warning>Found no packages to reinstall, aborting.</warning>');
|
$io->writeError('<warning>Found no packages to reinstall, aborting.</warning>');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,11 @@ use Composer\Repository\RootPackageRepository;
|
||||||
use Composer\Semver\Constraint\ConstraintInterface;
|
use Composer\Semver\Constraint\ConstraintInterface;
|
||||||
use Composer\Semver\Semver;
|
use Composer\Semver\Semver;
|
||||||
use Composer\Spdx\SpdxLicenses;
|
use Composer\Spdx\SpdxLicenses;
|
||||||
use Composer\Util\Platform;
|
|
||||||
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Terminal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert Schönthal <seroscho@googlemail.com>
|
* @author Robert Schönthal <seroscho@googlemail.com>
|
||||||
|
|
|
@ -23,8 +23,8 @@ class GenericRule extends Rule
|
||||||
protected $literals;
|
protected $literals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $literals
|
* @param array $literals
|
||||||
* @param int|null $reason A RULE_* constant describing the reason for generating this rule
|
* @param int|null $reason A RULE_* constant describing the reason for generating this rule
|
||||||
* @param Link|BasePackage|int|null $reasonData
|
* @param Link|BasePackage|int|null $reasonData
|
||||||
*/
|
*/
|
||||||
public function __construct(array $literals, $reason, $reasonData)
|
public function __construct(array $literals, $reason, $reasonData)
|
||||||
|
|
|
@ -25,8 +25,8 @@ class MultiConflictRule extends Rule
|
||||||
protected $literals;
|
protected $literals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $literals
|
* @param array $literals
|
||||||
* @param int $reason A RULE_* constant describing the reason for generating this rule
|
* @param int $reason A RULE_* constant describing the reason for generating this rule
|
||||||
* @param Link|BasePackage $reasonData
|
* @param Link|BasePackage $reasonData
|
||||||
*/
|
*/
|
||||||
public function __construct(array $literals, $reason, $reasonData)
|
public function __construct(array $literals, $reason, $reasonData)
|
||||||
|
|
|
@ -441,7 +441,7 @@ class Problem
|
||||||
if ($topPackage instanceof RootPackageInterface) {
|
if ($topPackage instanceof RootPackageInterface) {
|
||||||
return array(
|
return array(
|
||||||
"- Root composer.json requires $packageName".self::constraintToText($constraint).', it is ',
|
"- Root composer.json requires $packageName".self::constraintToText($constraint).', it is ',
|
||||||
'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.$topPackage->getPrettyName().' is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.'
|
'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.$topPackage->getPrettyName().' is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ class Problem
|
||||||
$singular = count($higherRepoPackages) === 1;
|
$singular = count($higherRepoPackages) === 1;
|
||||||
|
|
||||||
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ',
|
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ',
|
||||||
'found '.self::getPackageList($nextRepoPackages, $isVerbose).' in the lock file and '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' but ' . ($singular ? 'it does' : 'these do') . ' not match your '.$reason.' and ' . ($singular ? 'is' : 'are') . ' therefore not installable. Make sure you either fix the '.$reason.' or avoid updating this package to keep the one from the lock file.');
|
'found '.self::getPackageList($nextRepoPackages, $isVerbose).' in the lock file and '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' but ' . ($singular ? 'it does' : 'these do') . ' not match your '.$reason.' and ' . ($singular ? 'is' : 'are') . ' therefore not installable. Make sure you either fix the '.$reason.' or avoid updating this package to keep the one from the lock file.', );
|
||||||
}
|
}
|
||||||
|
|
||||||
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ', 'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' has higher repository priority. The packages with higher priority do not match your '.$reason.' and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.');
|
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ', 'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' has higher repository priority. The packages with higher priority do not match your '.$reason.' and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.');
|
||||||
|
|
|
@ -243,7 +243,6 @@ abstract class Rule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $package2->getPrettyString().' conflicts with '.$conflictTarget.'.';
|
return $package2->getPrettyString().' conflicts with '.$conflictTarget.'.';
|
||||||
|
|
||||||
case self::RULE_PACKAGE_REQUIRES:
|
case self::RULE_PACKAGE_REQUIRES:
|
||||||
|
|
|
@ -24,9 +24,9 @@ class Rule2Literals extends Rule
|
||||||
protected $literal2;
|
protected $literal2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $literal1
|
* @param int $literal1
|
||||||
* @param int $literal2
|
* @param int $literal2
|
||||||
* @param int $reason A RULE_* constant describing the reason for generating this rule
|
* @param int $reason A RULE_* constant describing the reason for generating this rule
|
||||||
* @param Link|BasePackage $reasonData
|
* @param Link|BasePackage $reasonData
|
||||||
*/
|
*/
|
||||||
public function __construct($literal1, $literal2, $reason, $reasonData)
|
public function __construct($literal1, $literal2, $reason, $reasonData)
|
||||||
|
|
|
@ -44,9 +44,9 @@ class RuleSetGenerator
|
||||||
* @param BasePackage $package The package with a requirement
|
* @param BasePackage $package The package with a requirement
|
||||||
* @param array $providers The providers of the requirement
|
* @param array $providers The providers of the requirement
|
||||||
* @param int $reason A RULE_* constant describing the
|
* @param int $reason A RULE_* constant describing the
|
||||||
* reason for generating this rule
|
* reason for generating this rule
|
||||||
* @param mixed $reasonData Any data, e.g. the requirement name,
|
* @param mixed $reasonData Any data, e.g. the requirement name,
|
||||||
* that goes with the reason
|
* that goes with the reason
|
||||||
* @return Rule|null The generated rule or null if tautological
|
* @return Rule|null The generated rule or null if tautological
|
||||||
*/
|
*/
|
||||||
protected function createRequireRule(BasePackage $package, array $providers, $reason, $reasonData = null)
|
protected function createRequireRule(BasePackage $package, array $providers, $reason, $reasonData = null)
|
||||||
|
@ -95,9 +95,9 @@ class RuleSetGenerator
|
||||||
* @param BasePackage $issuer The package declaring the conflict
|
* @param BasePackage $issuer The package declaring the conflict
|
||||||
* @param BasePackage $provider The package causing the conflict
|
* @param BasePackage $provider The package causing the conflict
|
||||||
* @param int $reason A RULE_* constant describing the
|
* @param int $reason A RULE_* constant describing the
|
||||||
* reason for generating this rule
|
* reason for generating this rule
|
||||||
* @param mixed $reasonData Any data, e.g. the package name, that
|
* @param mixed $reasonData Any data, e.g. the package name, that
|
||||||
* goes with the reason
|
* goes with the reason
|
||||||
* @return Rule|null The generated rule
|
* @return Rule|null The generated rule
|
||||||
*/
|
*/
|
||||||
protected function createRule2Literals(BasePackage $issuer, BasePackage $provider, $reason, $reasonData = null)
|
protected function createRule2Literals(BasePackage $issuer, BasePackage $provider, $reason, $reasonData = null)
|
||||||
|
|
|
@ -115,8 +115,8 @@ abstract class ArchiveDownloader extends FileDownloader
|
||||||
* that the source directory gets merged into the target one if the target exists. Otherwise rename() by default would
|
* that the source directory gets merged into the target one if the target exists. Otherwise rename() by default would
|
||||||
* put the source into the target e.g. src/ => target/src/ (assuming target exists) instead of src/ => target/
|
* put the source into the target e.g. src/ => target/src/ (assuming target exists) instead of src/ => target/
|
||||||
*
|
*
|
||||||
* @param string $from Directory
|
* @param string $from Directory
|
||||||
* @param string $to Directory
|
* @param string $to Directory
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
$renameRecursively = function ($from, $to) use ($filesystem, $getFolderContent, $package, &$renameRecursively) {
|
$renameRecursively = function ($from, $to) use ($filesystem, $getFolderContent, $package, &$renameRecursively) {
|
||||||
|
|
|
@ -77,5 +77,5 @@ class RarDownloader extends ArchiveDownloader
|
||||||
$rarArchive->close();
|
$rarArchive->close();
|
||||||
|
|
||||||
return \React\Promise\resolve();
|
return \React\Promise\resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,8 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
/**
|
/**
|
||||||
* extract $file to $path with "unzip" command
|
* extract $file to $path with "unzip" command
|
||||||
*
|
*
|
||||||
* @param string $file File to extract
|
* @param string $file File to extract
|
||||||
* @param string $path Path where to extract file
|
* @param string $path Path where to extract file
|
||||||
* @return PromiseInterface
|
* @return PromiseInterface
|
||||||
*/
|
*/
|
||||||
private function extractWithSystemUnzip(PackageInterface $package, $file, $path)
|
private function extractWithSystemUnzip(PackageInterface $package, $file, $path)
|
||||||
|
@ -136,8 +136,8 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
/**
|
/**
|
||||||
* extract $file to $path with ZipArchive
|
* extract $file to $path with ZipArchive
|
||||||
*
|
*
|
||||||
* @param string $file File to extract
|
* @param string $file File to extract
|
||||||
* @param string $path Path where to extract file
|
* @param string $path Path where to extract file
|
||||||
* @return PromiseInterface
|
* @return PromiseInterface
|
||||||
*
|
*
|
||||||
* TODO v3 should make this private once we can drop PHP 5.3 support
|
* TODO v3 should make this private once we can drop PHP 5.3 support
|
||||||
|
|
|
@ -16,7 +16,6 @@ use Composer\IO\IOInterface;
|
||||||
use Composer\IO\ConsoleIO;
|
use Composer\IO\ConsoleIO;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Repository\RepositoryInterface;
|
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\DependencyResolver\Operation\OperationInterface;
|
use Composer\DependencyResolver\Operation\OperationInterface;
|
||||||
use Composer\DependencyResolver\Operation\InstallOperation;
|
use Composer\DependencyResolver\Operation\InstallOperation;
|
||||||
|
|
|
@ -98,9 +98,9 @@ class SuggestedPackagesReporter
|
||||||
*
|
*
|
||||||
* Do not list the ones already installed if installed repository provided.
|
* Do not list the ones already installed if installed repository provided.
|
||||||
*
|
*
|
||||||
* @param int $mode One of the MODE_* constants from this class
|
* @param int $mode One of the MODE_* constants from this class
|
||||||
* @param InstalledRepository|null $installedRepo If passed in, suggested packages which are installed already will be skipped
|
* @param InstalledRepository|null $installedRepo If passed in, suggested packages which are installed already will be skipped
|
||||||
* @param PackageInterface|null $onlyDependentsOf If passed in, only the suggestions from direct dependents of that package, or from the package itself, will be shown
|
* @param PackageInterface|null $onlyDependentsOf If passed in, only the suggestions from direct dependents of that package, or from the package itself, will be shown
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function output($mode, InstalledRepository $installedRepo = null, PackageInterface $onlyDependentsOf = null)
|
public function output($mode, InstalledRepository $installedRepo = null, PackageInterface $onlyDependentsOf = null)
|
||||||
|
@ -165,8 +165,8 @@ class SuggestedPackagesReporter
|
||||||
/**
|
/**
|
||||||
* Output number of new suggested packages and a hint to use suggest command.
|
* Output number of new suggested packages and a hint to use suggest command.
|
||||||
*
|
*
|
||||||
* @param InstalledRepository|null $installedRepo If passed in, suggested packages which are installed already will be skipped
|
* @param InstalledRepository|null $installedRepo If passed in, suggested packages which are installed already will be skipped
|
||||||
* @param PackageInterface|null $onlyDependentsOf If passed in, only the suggestions from direct dependents of that package, or from the package itself, will be shown
|
* @param PackageInterface|null $onlyDependentsOf If passed in, only the suggestions from direct dependents of that package, or from the package itself, will be shown
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function outputMinimalistic(InstalledRepository $installedRepo = null, PackageInterface $onlyDependentsOf = null)
|
public function outputMinimalistic(InstalledRepository $installedRepo = null, PackageInterface $onlyDependentsOf = null)
|
||||||
|
|
|
@ -43,9 +43,9 @@ class AliasPackage extends BasePackage
|
||||||
/**
|
/**
|
||||||
* All descendants' constructors should call this parent constructor
|
* All descendants' constructors should call this parent constructor
|
||||||
*
|
*
|
||||||
* @param BasePackage $aliasOf The package this package is an alias of
|
* @param BasePackage $aliasOf The package this package is an alias of
|
||||||
* @param string $version The version the alias must report
|
* @param string $version The version the alias must report
|
||||||
* @param string $prettyVersion The alias's non-normalized version
|
* @param string $prettyVersion The alias's non-normalized version
|
||||||
*/
|
*/
|
||||||
public function __construct(BasePackage $aliasOf, $version, $prettyVersion)
|
public function __construct(BasePackage $aliasOf, $version, $prettyVersion)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Package\Archiver;
|
namespace Composer\Package\Archiver;
|
||||||
|
|
||||||
use Composer\Downloader\DownloadManager;
|
use Composer\Downloader\DownloadManager;
|
||||||
use Composer\Package\PackageInterface;
|
|
||||||
use Composer\Package\RootPackageInterface;
|
use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Util\Loop;
|
use Composer\Util\Loop;
|
||||||
|
|
|
@ -24,8 +24,8 @@ class CompleteAliasPackage extends AliasPackage implements CompletePackageInterf
|
||||||
* All descendants' constructors should call this parent constructor
|
* All descendants' constructors should call this parent constructor
|
||||||
*
|
*
|
||||||
* @param CompletePackage $aliasOf The package this package is an alias of
|
* @param CompletePackage $aliasOf The package this package is an alias of
|
||||||
* @param string $version The version the alias must report
|
* @param string $version The version the alias must report
|
||||||
* @param string $prettyVersion The alias's non-normalized version
|
* @param string $prettyVersion The alias's non-normalized version
|
||||||
*/
|
*/
|
||||||
public function __construct(CompletePackage $aliasOf, $version, $prettyVersion)
|
public function __construct(CompletePackage $aliasOf, $version, $prettyVersion)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ interface CompletePackageInterface extends PackageInterface
|
||||||
public function getScripts();
|
public function getScripts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<string, string[]> $scripts
|
* @param array<string, string[]> $scripts
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setScripts(array $scripts);
|
public function setScripts(array $scripts);
|
||||||
|
@ -205,6 +205,4 @@ interface CompletePackageInterface extends PackageInterface
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setArchiveExcludes(array $excludes);
|
public function setArchiveExcludes(array $excludes);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,9 +77,9 @@ class Link
|
||||||
*
|
*
|
||||||
* @param string $source
|
* @param string $source
|
||||||
* @param string $target
|
* @param string $target
|
||||||
* @param ConstraintInterface $constraint Constraint applying to the target of this link
|
* @param ConstraintInterface $constraint Constraint applying to the target of this link
|
||||||
* @param self::TYPE_* $description Used to create a descriptive string representation
|
* @param self::TYPE_* $description Used to create a descriptive string representation
|
||||||
* @param string|null $prettyConstraint
|
* @param string|null $prettyConstraint
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
$source,
|
$source,
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ArrayLoader implements LoaderInterface
|
||||||
/**
|
/**
|
||||||
* @template PackageClass of CompletePackageInterface
|
* @template PackageClass of CompletePackageInterface
|
||||||
* @param array $versions
|
* @param array $versions
|
||||||
* @param string $class FQCN to be instantiated
|
* @param string $class FQCN to be instantiated
|
||||||
* @return list<CompletePackage|CompleteAliasPackage>
|
* @return list<CompletePackage|CompleteAliasPackage>
|
||||||
* @phpstan-param class-string<PackageClass> $class
|
* @phpstan-param class-string<PackageClass> $class
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,11 +13,9 @@
|
||||||
namespace Composer\Package\Loader;
|
namespace Composer\Package\Loader;
|
||||||
|
|
||||||
use Composer\Package\BasePackage;
|
use Composer\Package\BasePackage;
|
||||||
use Composer\Package\AliasPackage;
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Package\Package;
|
use Composer\Package\Package;
|
||||||
use Composer\Package\RootPackageInterface;
|
|
||||||
use Composer\Package\RootAliasPackage;
|
use Composer\Package\RootAliasPackage;
|
||||||
use Composer\Repository\RepositoryFactory;
|
use Composer\Repository\RepositoryFactory;
|
||||||
use Composer\Package\Version\VersionGuesser;
|
use Composer\Package\Version\VersionGuesser;
|
||||||
|
|
|
@ -24,8 +24,8 @@ class RootAliasPackage extends CompleteAliasPackage implements RootPackageInterf
|
||||||
* All descendants' constructors should call this parent constructor
|
* All descendants' constructors should call this parent constructor
|
||||||
*
|
*
|
||||||
* @param RootPackageInterface $aliasOf The package this package is an alias of
|
* @param RootPackageInterface $aliasOf The package this package is an alias of
|
||||||
* @param string $version The version the alias must report
|
* @param string $version The version the alias must report
|
||||||
* @param string $prettyVersion The alias's non-normalized version
|
* @param string $prettyVersion The alias's non-normalized version
|
||||||
*/
|
*/
|
||||||
public function __construct(RootPackageInterface $aliasOf, $version, $prettyVersion)
|
public function __construct(RootPackageInterface $aliasOf, $version, $prettyVersion)
|
||||||
{
|
{
|
||||||
|
|
|
@ -477,7 +477,7 @@ class PluginManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @template CapabilityClass of Capability
|
* @template CapabilityClass of Capability
|
||||||
* @param PluginInterface $plugin
|
* @param PluginInterface $plugin
|
||||||
* @param class-string<CapabilityClass> $capabilityClassName The fully qualified name of the API interface which the plugin may provide
|
* @param class-string<CapabilityClass> $capabilityClassName The fully qualified name of the API interface which the plugin may provide
|
||||||
* an implementation of.
|
* an implementation of.
|
||||||
* @param array $ctorArgs Arguments passed to Capability's constructor.
|
* @param array $ctorArgs Arguments passed to Capability's constructor.
|
||||||
|
@ -509,12 +509,12 @@ class PluginManager
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @template CapabilityClass of Capability
|
* @template CapabilityClass of Capability
|
||||||
* @param class-string<CapabilityClass> $capabilityClassName The fully qualified name of the API interface which the plugin may provide
|
* @param class-string<CapabilityClass> $capabilityClassName The fully qualified name of the API interface which the plugin may provide
|
||||||
* an implementation of.
|
* an implementation of.
|
||||||
* @param array $ctorArgs Arguments passed to Capability's constructor.
|
* @param array $ctorArgs Arguments passed to Capability's constructor.
|
||||||
* Keeping it an array will allow future values to be passed w\o changing the signature.
|
* Keeping it an array will allow future values to be passed w\o changing the signature.
|
||||||
* @return CapabilityClass[]
|
* @return CapabilityClass[]
|
||||||
*/
|
*/
|
||||||
public function getPluginCapabilities($capabilityClassName, array $ctorArgs = array())
|
public function getPluginCapabilities($capabilityClassName, array $ctorArgs = array())
|
||||||
|
|
|
@ -50,12 +50,12 @@ class PostFileDownloadEvent extends Event
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param string $name The event name
|
* @param string $name The event name
|
||||||
* @param string|null $fileName The file name
|
* @param string|null $fileName The file name
|
||||||
* @param string|null $checksum The checksum
|
* @param string|null $checksum The checksum
|
||||||
* @param string $url The processed url
|
* @param string $url The processed url
|
||||||
* @param string $type The type (package or metadata).
|
* @param string $type The type (package or metadata).
|
||||||
* @param mixed $context Additional context for the download.
|
* @param mixed $context Additional context for the download.
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $fileName, $checksum, $url, $type, $context = null)
|
public function __construct($name, $fileName, $checksum, $url, $type, $context = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace Composer\Repository;
|
||||||
|
|
||||||
use Composer\Json\JsonFile;
|
use Composer\Json\JsonFile;
|
||||||
use Composer\Package\Loader\ArrayLoader;
|
use Composer\Package\Loader\ArrayLoader;
|
||||||
use Composer\Package\PackageInterface;
|
|
||||||
use Composer\Package\RootPackageInterface;
|
use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Package\Dumper\ArrayDumper;
|
use Composer\Package\Dumper\ArrayDumper;
|
||||||
|
|
|
@ -72,8 +72,8 @@ interface RepositoryInterface extends \Countable
|
||||||
*
|
*
|
||||||
* @param ConstraintInterface[] $packageNameMap package names pointing to constraints
|
* @param ConstraintInterface[] $packageNameMap package names pointing to constraints
|
||||||
* @param array<string, BasePackage::STABILITY_*> $acceptableStabilities array of stability => BasePackage::STABILITY_* value
|
* @param array<string, BasePackage::STABILITY_*> $acceptableStabilities array of stability => BasePackage::STABILITY_* value
|
||||||
* @param array<string, BasePackage::STABILITY_*> $stabilityFlags an array of package name => BasePackage::STABILITY_* value
|
* @param array<string, BasePackage::STABILITY_*> $stabilityFlags an array of package name => BasePackage::STABILITY_* value
|
||||||
* @param array<string, array<string, PackageInterface>> $alreadyLoaded an array of package name => package version => package
|
* @param array<string, array<string, PackageInterface>> $alreadyLoaded an array of package name => package version => package
|
||||||
*
|
*
|
||||||
* @return array{namesFound: string[], packages: PackageInterface[]}
|
* @return array{namesFound: string[], packages: PackageInterface[]}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -228,6 +228,7 @@ class GitLabDriver extends VcsDriver
|
||||||
if ($this->protocol) {
|
if ($this->protocol) {
|
||||||
return $this->project["{$this->protocol}_url_to_repo"];
|
return $this->project["{$this->protocol}_url_to_repo"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->isPrivate ? $this->project['ssh_url_to_repo'] : $this->project['http_url_to_repo'];
|
return $this->isPrivate ? $this->project['ssh_url_to_repo'] : $this->project['http_url_to_repo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -606,7 +606,7 @@ class Filesystem
|
||||||
* This will also check for readability by reading the file as is_readable can not be trusted on network-mounts
|
* This will also check for readability by reading the file as is_readable can not be trusted on network-mounts
|
||||||
* and \\wsl$ paths. See https://github.com/composer/composer/issues/8231 and https://bugs.php.net/bug.php?id=68926
|
* and \\wsl$ paths. See https://github.com/composer/composer/issues/8231 and https://bugs.php.net/bug.php?id=68926
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isReadable($path)
|
public static function isReadable($path)
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
namespace Composer\Util;
|
namespace Composer\Util;
|
||||||
|
|
||||||
use Composer\Package\Link;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
|
|
||||||
class PackageSorter
|
class PackageSorter
|
||||||
|
|
|
@ -42,7 +42,6 @@ class Platform
|
||||||
* putenv('X') equivalent but updates the runtime global variables too
|
* putenv('X') equivalent but updates the runtime global variables too
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $value
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function clearEnv($name)
|
public static function clearEnv($name)
|
||||||
|
|
|
@ -260,9 +260,11 @@ class ProcessExecutor
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,9 +274,11 @@ class ProcessExecutor
|
||||||
$process->start();
|
$process->start();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,5 +113,4 @@ class InitCommandTest extends TestCase
|
||||||
$namespace = $command->namespaceFromPackageName(null);
|
$namespace = $command->namespaceFromPackageName(null);
|
||||||
$this->assertNull($namespace);
|
$this->assertNull($namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,6 @@ class ZipDownloaderTest extends TestCase
|
||||||
|
|
||||||
$downloader = new ZipDownloader($this->io, $this->config, $this->httpDownloader);
|
$downloader = new ZipDownloader($this->io, $this->config, $this->httpDownloader);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$loop = new Loop($this->httpDownloader);
|
$loop = new Loop($this->httpDownloader);
|
||||||
$promise = $downloader->download($this->package, $path = sys_get_temp_dir().'/composer-zip-test');
|
$promise = $downloader->download($this->package, $path = sys_get_temp_dir().'/composer-zip-test');
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Test\Mock;
|
namespace Composer\Test\Mock;
|
||||||
|
|
||||||
use Composer\Installer\InstallationManager;
|
use Composer\Installer\InstallationManager;
|
||||||
use Composer\Repository\RepositoryInterface;
|
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
|
|
Loading…
Reference in New Issue