message: "#^Property Composer\\\\Config\\:\\:\\$warnedHosts \\(array\\<string, true\\>\\) does not accept non\\-empty\\-array\\<0\\|string, true\\>\\.$#"
count: 1
path: ../src/Composer/Config.php
-
message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
message: "#^Property Composer\\\\DependencyResolver\\\\RuleSet\\:\\:\\$rulesByHash \\(array\\<string, array\\<Composer\\\\DependencyResolver\\\\Rule\\>\\|Composer\\\\DependencyResolver\\\\Rule\\>\\) does not accept array\\<int\\|string, array\\<Composer\\\\DependencyResolver\\\\Rule\\>\\|Composer\\\\DependencyResolver\\\\Rule\\>\\.$#"
message: "#^Property Composer\\\\Plugin\\\\PluginManager\\:\\:\\$registeredPlugins \\(array\\<string, Composer\\\\Plugin\\\\PluginInterface\\>\\) does not accept array\\<string, object\\>\\.$#"
count: 2
path: ../src/Composer/Plugin/PluginManager.php
-
message: "#^Property Composer\\\\Plugin\\\\PostFileDownloadEvent\\:\\:\\$fileName \\(string\\) does not accept string\\|null\\.$#"
message: "#^Property Composer\\\\Repository\\\\ArrayRepository\\:\\:\\$packages \\(array\\<Composer\\\\Package\\\\BasePackage\\>\\|null\\) does not accept array\\<Composer\\\\Package\\\\PackageInterface\\>\\.$#"
message: "#^Argument of an invalid type array\\<string, Composer\\\\Package\\\\PackageInterface\\>\\|null supplied for foreach, only iterables are supported\\.$#"
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitDriver\\:\\:\\$branches \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitDriver\\:\\:\\$tags \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitLabDriver\\:\\:\\$commits \\(array\\<string, array\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
message: "#^Call to function is_array\\(\\) with array\\<string, array\\{username\\: string, password\\: string\\}\\> will always evaluate to true\\.$#"
count: 1
path: ../tests/Composer/Test/IO/NullIOTest.php
-
message: """
#^Call to deprecated method getRawData\\(\\) of class Composer\\\\InstalledVersions\\:
message: "#^Property Composer\\\\Test\\\\Plugin\\\\PluginInstallerTest\\:\\:\\$packages \\(array\\<Composer\\\\Package\\\\CompletePackage\\>\\) does not accept array\\<Composer\\\\Package\\\\CompleteAliasPackage\\|Composer\\\\Package\\\\CompletePackage\\>\\.$#"
message: "#^Unable to resolve the template type CapabilityClass in call to method Composer\\\\Plugin\\\\PluginManager\\:\\:getPluginCapability\\(\\)$#"
@ -113,12 +113,15 @@ class ArrayLoader implements LoaderInterface
if (!isset($config['name'])) {
throw new \UnexpectedValueException('Unknown package has no name defined ('.json_encode($config).').');
}
if (!isset($config['version'])) {
if (!isset($config['version']) || !is_scalar($config['version'])) {
throw new \UnexpectedValueException('Package '.$config['name'].' has no version defined.');
}
if (!is_string($config['version'])) {
$config['version'] = (string) $config['version'];
}
// handle already normalized versions
if (isset($config['version_normalized'])) {
if (isset($config['version_normalized'])&& is_string($config['version_normalized'])) {
$version = $config['version_normalized'];
// handling of existing repos which need to remain composer v1 compatible, in case the version_normalized contained VersionParser::DEFAULT_BRANCH_ALIAS, we renormalize it
if (!is_a($class, 'Composer\Installer\InstallerInterface', true)) {
throw new \RuntimeException('Could not activate plugin "'.$package->getName().'" as "'.$class.'" does not implement Composer\Installer\InstallerInterface');
}
$this->io->writeError('<warning>Loading "'.$package->getName() . '" '.($isGlobalPlugin ? '(installed globally) ' : '').'which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x.</warning>');
$installer = new $class($this->io, $this->composer);
throw new \LogicException('Composer repositories that have lazy providers and no available-packages list can not load the complete list of packages, use getPackageNames instead.');
@ -609,6 +612,9 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
}
if ($this->hasPartialPackages()) {
if (!is_array($this->partialPackagesByName)) {
throw new \LogicException('hasPartialPackages failed to initialize $this->partialPackagesByName');
}
foreach ($this->partialPackagesByName as $versions) {
foreach ($versions as $candidate) {
if (isset($result[$candidate['name']]) || !isset($candidate['provide'][$packageName])) {
@ -1314,7 +1320,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito