1
0
Fork 0

Update deps, update baseline (1677, 97), fixes #11875

pull/11880/head
Jordi Boggiano 2024-03-08 08:51:56 +01:00
parent 66acb84c12
commit c5aa3dc021
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
8 changed files with 28 additions and 25 deletions

View File

@ -1656,7 +1656,7 @@ parameters:
path: ../src/Composer/Downloader/FileDownloader.php path: ../src/Composer/Downloader/FileDownloader.php
- -
message: "#^Strict comparison using \\=\\=\\= between null and Composer\\\\Util\\\\Http\\\\Response will always evaluate to false\\.$#" message: "#^Strict comparison using \\=\\=\\= between null and Composer\\\\Util\\\\Http\\\\Response\\|string will always evaluate to false\\.$#"
count: 1 count: 1
path: ../src/Composer/Downloader/FileDownloader.php path: ../src/Composer/Downloader/FileDownloader.php
@ -4228,11 +4228,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Util/Http/CurlDownloader.php path: ../src/Composer/Util/Http/CurlDownloader.php
-
message: "#^Parameter \\#1 \\$mh of function curl_multi_setopt expects resource, resource\\|false given\\.$#"
count: 2
path: ../src/Composer/Util/Http/CurlDownloader.php
- -
message: "#^Parameter \\#1 \\$str of function preg_quote expects string, string\\|false\\|null given\\.$#" message: "#^Parameter \\#1 \\$str of function preg_quote expects string, string\\|false\\|null given\\.$#"
count: 1 count: 1
@ -4313,11 +4308,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Util/Http/CurlDownloader.php path: ../src/Composer/Util/Http/CurlDownloader.php
-
message: "#^Property Composer\\\\Util\\\\Http\\\\CurlDownloader\\:\\:\\$multiHandle \\(resource\\|null\\) does not accept resource\\|false\\.$#"
count: 1
path: ../src/Composer/Util/Http/CurlDownloader.php
- -
message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
count: 1 count: 1
@ -4483,6 +4473,11 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Util/NoProxyPattern.php path: ../src/Composer/Util/NoProxyPattern.php
-
message: "#^Method Composer\\\\Util\\\\NoProxyPattern\\:\\:ipCheckData\\(\\) never assigns null to &\\$ipdata so it can be removed from the by\\-ref type\\.$#"
count: 1
path: ../src/Composer/Util/NoProxyPattern.php
- -
message: "#^Only booleans are allowed in a negated boolean, bool\\|stdClass given\\.$#" message: "#^Only booleans are allowed in a negated boolean, bool\\|stdClass given\\.$#"
count: 1 count: 1
@ -4773,6 +4768,11 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Util/RemoteFilesystem.php path: ../src/Composer/Util/RemoteFilesystem.php
-
message: "#^Parameter &\\$responseHeaders @param\\-out type of method Composer\\\\Util\\\\RemoteFilesystem\\:\\:getRemoteContents\\(\\) expects list\\<string\\>, array\\<int, string\\> given\\.$#"
count: 1
path: ../src/Composer/Util/RemoteFilesystem.php
- -
message: "#^Property Composer\\\\Util\\\\RemoteFilesystem\\:\\:\\$scheme \\(string\\) does not accept string\\|false\\|null\\.$#" message: "#^Property Composer\\\\Util\\\\RemoteFilesystem\\:\\:\\$scheme \\(string\\) does not accept string\\|false\\|null\\.$#"
count: 1 count: 1
@ -5321,11 +5321,6 @@ parameters:
count: 1 count: 1
path: ../tests/Composer/Test/Question/StrictConfirmationQuestionTest.php path: ../tests/Composer/Test/Question/StrictConfirmationQuestionTest.php
-
message: "#^Cannot call method getDistType\\(\\) on Composer\\\\Package\\\\BasePackage\\|null\\.$#"
count: 1
path: ../tests/Composer/Test/Repository/ArtifactRepositoryTest.php
- -
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#" message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#"
count: 2 count: 2

View File

@ -106,7 +106,7 @@ EOT
$this->outputResult($io, $file, $errors, $warnings, $checkPublish, $publishErrors, $checkLock, $lockErrors, true); $this->outputResult($io, $file, $errors, $warnings, $checkPublish, $publishErrors, $checkLock, $lockErrors, true);
// $errors include publish and lock errors when exists // $errors include publish and lock errors when exists
$exitCode = $errors ? 2 : ($isStrict && $warnings ? 1 : 0); $exitCode = count($errors) > 0 ? 2 : (($isStrict && count($warnings) > 0) ? 1 : 0);
if ($input->getOption('with-dependencies')) { if ($input->getOption('with-dependencies')) {
$localRepo = $composer->getRepositoryManager()->getLocalRepository(); $localRepo = $composer->getRepositoryManager()->getLocalRepository();
@ -122,7 +122,7 @@ EOT
$this->outputResult($io, $package->getPrettyName(), $errors, $warnings, $checkPublish, $publishErrors); $this->outputResult($io, $package->getPrettyName(), $errors, $warnings, $checkPublish, $publishErrors);
// $errors include publish errors when exists // $errors include publish errors when exists
$depCode = $errors ? 2 : ($isStrict && $warnings ? 1 : 0); $depCode = count($errors) > 0 ? 2 : (($isStrict && count($warnings) > 0) ? 1 : 0);
$exitCode = max($depCode, $exitCode); $exitCode = max($depCode, $exitCode);
} }
} }

View File

@ -313,7 +313,7 @@ class ArrayLoader implements LoaderInterface
} }
/** /**
* @param array<string, array<string, array<string, array<string, array{string, Link}>>>> $linkCache * @param array<string, array<string, array<int|string, array<int|string, array{string, Link}>>>> $linkCache
* @param mixed[] $config * @param mixed[] $config
*/ */
private function configureCachedLinks(array &$linkCache, PackageInterface $package, array $config): void private function configureCachedLinks(array &$linkCache, PackageInterface $package, array $config): void

View File

@ -21,6 +21,8 @@ class Version
{ {
/** /**
* @param bool $isFips Set by the method * @param bool $isFips Set by the method
*
* @param-out bool $isFips
*/ */
public static function parseOpenssl(string $opensslVersion, ?bool &$isFips): ?string public static function parseOpenssl(string $opensslVersion, ?bool &$isFips): ?string
{ {

View File

@ -357,11 +357,12 @@ class Git
} }
/** /**
* @param string[] $match * @param array<mixed> $match
* @param-out array<int|string, string> $match
*/ */
private function isAuthenticationFailure(string $url, array &$match): bool private function isAuthenticationFailure(string $url, array &$match): bool
{ {
if (!Preg::isMatch('{^(https?://)([^/]+)(.*)$}i', $url, $match)) { if (!Preg::isMatchStrictGroups('{^(https?://)([^/]+)(.*)$}i', $url, $match)) {
return false; return false;
} }

View File

@ -104,10 +104,12 @@ class ProxyHelper
/** /**
* Searches $_SERVER for case-sensitive values * Searches $_SERVER for case-sensitive values
* *
* @param string[] $names Names to search for * @param non-empty-list<string> $names Names to search for
* @param string|null $name Name of any found value * @param string|null $name Name of any found value, you should only rely on it if the function returned a non-null value
* *
* @return string|null The found value * @return string|null The found value
*
* @param-out string $name
*/ */
private static function getProxyEnv(array $names, ?string &$name): ?string private static function getProxyEnv(array $names, ?string &$name): ?string
{ {

View File

@ -94,6 +94,7 @@ class ProxyManager
} else { } else {
$proxyUrl = $this->fullProxy[$scheme]; $proxyUrl = $this->fullProxy[$scheme];
$options = $this->streams[$scheme]['options']; $options = $this->streams[$scheme]['options'];
assert(is_array($options));
ProxyHelper::setRequestFullUri($requestUrl, $options); ProxyHelper::setRequestFullUri($requestUrl, $options);
$formattedProxyUrl = $this->safeProxy[$scheme]; $formattedProxyUrl = $this->safeProxy[$scheme];
} }

View File

@ -509,6 +509,8 @@ class RemoteFilesystem
* @param int $maxFileSize The maximum allowed file size * @param int $maxFileSize The maximum allowed file size
* *
* @return string|false The response contents or false on failure * @return string|false The response contents or false on failure
*
* @param-out list<string> $responseHeaders
*/ */
protected function getRemoteContents(string $originUrl, string $fileUrl, $context, ?array &$responseHeaders = null, ?int $maxFileSize = null) protected function getRemoteContents(string $originUrl, string $fileUrl, $context, ?array &$responseHeaders = null, ?int $maxFileSize = null)
{ {