From 31429ce099aca24964dd8ea31531551e8a0bf5ed Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 21 Jan 2022 16:11:22 +0100 Subject: [PATCH] Update baselines --- phpstan/baseline-8.1.neon | 387 +++++++++++++++++++++++++++++++++++++- phpstan/baseline.neon | 20 ++ 2 files changed, 406 insertions(+), 1 deletion(-) diff --git a/phpstan/baseline-8.1.neon b/phpstan/baseline-8.1.neon index 204c842c7..1b93dddd8 100644 --- a/phpstan/baseline-8.1.neon +++ b/phpstan/baseline-8.1.neon @@ -1,7 +1,392 @@ parameters: ignoreErrors: - - message: "#^Property Composer\\\\Util\\\\Http\\\\CurlDownloader\\:\\:\\$jobs \\(array\\\\) does not accept non\\-empty\\-array\\, options\\: array, progress\\: array, curlHandle\\: CurlHandle\\|resource, filename\\: string\\|false\\|null, headerHandle\\: resource, \\.\\.\\.\\}\\>\\.$#" + message: "#^Parameter \\#1 \\$callback of function spl_autoload_register expects \\(callable\\(string\\)\\: void\\)\\|null, array\\{\\$this\\(Composer\\\\Autoload\\\\ClassLoader\\), 'loadClass'\\} given\\.$#" + count: 1 + path: ../src/Composer/Autoload/ClassLoader.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\\\|null given\\.$#" + count: 2 + path: ../src/Composer/Command/BaseDependencyCommand.php + + - + message: "#^Only booleans are allowed in an if condition, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/ConfigCommand.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\{Composer\\\\Config\\\\JsonConfigSource, string\\} given\\.$#" + count: 2 + path: ../src/Composer/Command/ConfigCommand.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/DiagnoseCommand.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/ExecCommand.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\<0, max\\>\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/InitCommand.php + + - + message: "#^Parameter \\#1 \\$from of function rename expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/SelfUpdateCommand.php + + - + message: "#^Parameter \\#1 \\$user_id of function posix_getpwuid expects int, int\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/SelfUpdateCommand.php + + - + message: "#^Parameter \\#2 \\$permissions of function chmod expects int, int\\|false given\\.$#" + count: 1 + path: ../src/Composer/Command/SelfUpdateCommand.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\\\>\\|string given\\.$#" + count: 1 + path: ../src/Composer/Command/ShowCommand.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\|string given\\.$#" + count: 1 + path: ../src/Composer/Command/ShowCommand.php + + - + message: "#^Parameter \\#2 \\$callback of function uasort expects callable\\(string, string\\)\\: int, 'version_compare' given\\.$#" + count: 1 + path: ../src/Composer/Command/ShowCommand.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\{Composer\\\\Package\\\\RootPackageInterface, 'getDevRequires'\\|'getRequires'\\} given\\.$#" + count: 1 + path: ../src/Composer/Command/ValidateCommand.php + + - + message: "#^Parameter \\#1 \\$string of function substr_replace expects array\\|string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Compiler.php + + - + message: "#^Parameter \\#1 \\$string of function rtrim expects string, int\\|string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Config.php + + - + message: "#^Parameter \\#1 \\$string of function rtrim expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Config.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Composer\\\\Json\\\\JsonManipulator, string\\} given\\.$#" + count: 1 + path: ../src/Composer/Config/JsonConfigSource.php + + - + message: "#^Parameter \\#2 \\$callback of function uksort expects callable\\(string, string\\)\\: int, 'version_compare' given\\.$#" + count: 2 + path: ../src/Composer/DependencyResolver/Problem.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, array\\\\>\\|string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/FileDownloader.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/GzipDownloader.php + + - + message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/GzipDownloader.php + + - + message: "#^Parameter \\#1 \\$stream of function gzclose expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/GzipDownloader.php + + - + message: "#^Parameter \\#1 \\$stream of function gzread expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/GzipDownloader.php + + - + message: "#^Parameter \\#3 \\$length of function fwrite expects int\\<0, max\\>\\|null, int given\\.$#" + count: 1 + path: ../src/Composer/Downloader/GzipDownloader.php + + - + message: "#^Parameter \\#1 \\$string of function rawurldecode expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Downloader/VcsDownloader.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\<0, max\\>\\|false given\\.$#" + count: 1 + path: ../src/Composer/EventDispatcher/EventDispatcher.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Factory.php + + - + message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/IO/BufferIO.php + + - + message: "#^Parameter \\#1 \\$stream of function rewind expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/IO/BufferIO.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Installer/BinaryInstaller.php + + - + message: "#^Parameter \\#1 \\$stream of function fgets expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Installer/BinaryInstaller.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, int\\\\|int\\<2, max\\>\\|string given\\.$#" + count: 1 + path: ../src/Composer/Installer/InstallationManager.php + + - + message: "#^Parameter \\#2 \\$handler of function pcntl_signal expects \\(callable\\(\\)\\: mixed\\)\\|int, int\\|string given\\.$#" + count: 2 + path: ../src/Composer/Installer/InstallationManager.php + + - + message: "#^Only numeric types are allowed in \\-, int\\|false given on the left side\\.$#" + count: 1 + path: ../src/Composer/Package/Archiver/PharArchiver.php + + - + message: "#^Parameter \\#2 \\$baseDirectory of method Phar\\:\\:buildFromIterator\\(\\) expects string\\|null, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Package/Archiver/PharArchiver.php + + - + message: "#^Parameter \\#1 \\$array of function ksort expects array, array\\\\|string given\\.$#" + count: 1 + path: ../src/Composer/Package/Dumper/ArrayDumper.php + + - + message: "#^Only booleans are allowed in an if condition, int\\|false given\\.$#" + count: 1 + path: ../src/Composer/Plugin/PluginManager.php + + - + message: "#^Parameter \\#1 \\$array of function array_splice expects array, array\\\\|null given\\.$#" + count: 1 + path: ../src/Composer/Repository/ArrayRepository.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\\\|null given\\.$#" + count: 1 + path: ../src/Composer/Repository/ArrayRepository.php + + - + message: "#^Parameter \\#1 \\$array of function array_keys expects array, array\\\\>\\|null given\\.$#" + count: 1 + path: ../src/Composer/Repository/ComposerRepository.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\\\|null given\\.$#" + count: 1 + path: ../src/Composer/Repository/ComposerRepository.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Repository/Vcs/GitLabDriver.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/SelfUpdate/Versions.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|false\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/AuthHelper.php + + - + message: "#^Parameter \\#1 \\$from of function stream_copy_to_stream expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/Filesystem.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 4 + path: ../src/Composer/Util/Filesystem.php + + - + message: "#^Parameter \\#1 \\$stream of function feof expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/Filesystem.php + + - + message: "#^Parameter \\#1 \\$stream of function fread expects resource, resource\\|false given\\.$#" + count: 2 + path: ../src/Composer/Util/Filesystem.php + + - + message: "#^Parameter \\#2 \\$to of function stream_copy_to_stream expects resource, resource\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/Filesystem.php + + - + message: "#^Parameter \\#1 \\$string of function rawurlencode expects string, string\\|null given\\.$#" + count: 17 + path: ../src/Composer/Util/Git.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/GitHub.php + + - + message: "#^Parameter \\#1 \\$string of function rawurlencode expects string, string\\|null given\\.$#" + count: 2 + path: ../src/Composer/Util/Hg.php + + - + message: "#^Parameter \\#1 \\$handle of function curl_close expects CurlHandle, resource given\\.$#" count: 1 path: ../src/Composer/Util/Http/CurlDownloader.php + - + message: "#^Parameter \\#1 \\$handle of function curl_getinfo expects CurlHandle, resource given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$multi_handle of function curl_multi_add_handle expects CurlMultiHandle, resource\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$multi_handle of function curl_multi_exec expects CurlMultiHandle, resource\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$multi_handle of function curl_multi_info_read expects CurlMultiHandle, resource\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$multi_handle of function curl_multi_remove_handle expects CurlMultiHandle, resource\\|null given\\.$#" + count: 2 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$multi_handle of function curl_multi_select expects CurlMultiHandle, resource\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$string of function rtrim expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#1 \\$string of function strtolower expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#2 \\$handle of function curl_multi_remove_handle expects CurlHandle, resource given\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Property Composer\\\\Util\\\\Http\\\\CurlDownloader\\:\\:\\$multiHandle \\(resource\\|null\\) does not accept CurlMultiHandle\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Property Composer\\\\Util\\\\Http\\\\CurlDownloader\\:\\:\\$shareHandle \\(resource\\|null\\) does not accept CurlShareHandle\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\<0, max\\>\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/NoProxyPattern.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 2 + path: ../src/Composer/Util/Perforce.php + + - + message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" + count: 13 + path: ../src/Composer/Util/Perforce.php + + - + message: "#^Parameter \\#1 \\$string1 of function strcmp expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Perforce.php + + - + message: "#^Parameter \\#2 \\$needle of function strpos expects string, string\\|null given\\.$#" + count: 1 + path: ../src/Composer/Util/Perforce.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\<0, max\\>\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/Perforce.php + + - + message: "#^Parameter \\#1 \\$string of function base64_encode expects string, string\\|false given\\.$#" + count: 1 + path: ../src/Composer/Util/RemoteFilesystem.php + + - + message: "#^Parameter \\#5 \\$length of function file_get_contents expects int\\<0, max\\>\\|null, int given\\.$#" + count: 1 + path: ../src/Composer/Util/RemoteFilesystem.php + + - + message: "#^Parameter \\#1 \\$include_path of function set_include_path expects string, string\\|false given\\.$#" + count: 2 + path: ../tests/Composer/Test/Autoload/AutoloadGeneratorTest.php + + - + message: "#^Parameter \\#1 \\$string of function rtrim expects string, string\\|false given\\.$#" + count: 2 + path: ../tests/Composer/Test/ConfigTest.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Composer\\\\Repository\\\\CompositeRepository, string\\} given\\.$#" + count: 1 + path: ../tests/Composer/Test/Repository/CompositeRepositoryTest.php + + - + message: "#^Parameter \\#1 \\$object of method ReflectionProperty\\:\\:getValue\\(\\) expects object\\|null, object\\|string given\\.$#" + count: 1 + path: ../tests/Composer/Test/Util/RemoteFilesystemTest.php + diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 03cf82999..93fb38c0a 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -4070,6 +4070,11 @@ parameters: count: 2 path: ../src/Composer/Installer/InstallationManager.php + - + message: "#^Constant PHP_WINDOWS_EVENT_CTRL_C not found\\.$#" + count: 1 + path: ../src/Composer/Installer/InstallationManager.php + - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 1 @@ -4080,6 +4085,11 @@ parameters: count: 2 path: ../src/Composer/Installer/InstallationManager.php + - + message: "#^Function sapi_windows_set_ctrl_handler not found\\.$#" + count: 3 + path: ../src/Composer/Installer/InstallationManager.php + - message: "#^Only booleans are allowed in &&, Composer\\\\EventDispatcher\\\\EventDispatcher\\|null given on the right side\\.$#" count: 2 @@ -6475,6 +6485,16 @@ parameters: count: 2 path: ../src/Composer/Util/Http/CurlDownloader.php + - + message: "#^Constant CURLOPT_PROXY_CAINFO not found\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + + - + message: "#^Constant CURLOPT_PROXY_CAPATH not found\\.$#" + count: 1 + path: ../src/Composer/Util/Http/CurlDownloader.php + - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 3