From 54cff69941d2c7e3061a3288af07e003edd445c0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 8 Apr 2023 22:53:00 +0100 Subject: [PATCH] Update SA tools (#553) --- phpstan-baseline.neon | 14 +-- psalm-baseline.xml | 149 ++++++++++++-------------- vendor-bin/php-cs-fixer/composer.json | 2 +- vendor-bin/phpstan/composer.json | 4 +- vendor-bin/psalm/composer.json | 2 +- 5 files changed, 77 insertions(+), 94 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 25961072..ab8266fc 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -220,16 +220,6 @@ parameters: count: 1 path: src/PumpStream.php - - - message: "#^Parameter \\#2 \\$subject of function preg_match expects string, mixed given\\.$#" - count: 1 - path: src/Request.php - - - - message: "#^Property GuzzleHttp\\\\Psr7\\\\Request\\:\\:\\$requestTarget \\(string\\|null\\) does not accept mixed\\.$#" - count: 1 - path: src/Request.php - - message: "#^Method GuzzleHttp\\\\Psr7\\\\ServerRequest\\:\\:normalizeNestedFileSpec\\(\\) should return array\\ but returns array\\\\|Psr\\\\Http\\\\Message\\\\UploadedFileInterface\\>\\.$#" count: 1 @@ -286,7 +276,7 @@ parameters: path: src/Uri.php - - message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(int\\|string\\)\\: mixed\\)\\|null, 'urldecode' given\\.$#" + message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(int\\<0, 65535\\>\\|string\\)\\: mixed\\)\\|null, 'urldecode' given\\.$#" count: 1 path: src/Uri.php @@ -301,7 +291,7 @@ parameters: path: src/UriNormalizer.php - - message: "#^Strict comparison using \\=\\=\\= between '' and non\\-empty\\-string will always evaluate to false\\.$#" + message: "#^Strict comparison using \\=\\=\\= between '' and non\\-falsy\\-string will always evaluate to false\\.$#" count: 1 path: src/UriResolver.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 2673b872..50614a5c 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,51 +1,44 @@ - - - - $this->stream - - - - - $this->stream - - + - - call_user_func($this->_fn___toString) - call_user_func($this->_fn_close) - call_user_func($this->_fn_detach) - call_user_func($this->_fn_eof) - call_user_func($this->_fn_getContents) - call_user_func($this->_fn_getMetadata, $key) - call_user_func($this->_fn_getSize) - call_user_func($this->_fn_isReadable) - call_user_func($this->_fn_isSeekable) - call_user_func($this->_fn_isWritable) - call_user_func($this->_fn_read, $length) - call_user_func($this->_fn_rewind) - call_user_func($this->_fn_seek, $offset, $whence) - call_user_func($this->_fn_tell) - call_user_func($this->_fn_write, $string) + + _fn___toString)]]> + _fn_close)]]> + _fn_detach)]]> + _fn_eof)]]> + _fn_getContents)]]> + _fn_getMetadata, $key)]]> + _fn_getSize)]]> + _fn_isReadable)]]> + _fn_isSeekable)]]> + _fn_isWritable)]]> + _fn_read, $length)]]> + _fn_rewind)]]> + _fn_seek, $offset, $whence)]]> + _fn_tell)]]> + _fn_write, $string)]]> + + + $m[0] + + - + $file - - - $this->stream - - - - - $this->stream - + + + $parts[1] + $parts[1] + $parts[1] + $parts[1] + - + MessageInterface MessageInterface MessageInterface @@ -54,7 +47,7 @@ array array - + $header $header $header @@ -63,75 +56,75 @@ $header - - - $filename - $filename - - - $this->stream - - - - isset($this->headerNames['host']) - + + $header + + + + + (int) $code + (string) $reasonPhrase + - + + $_SERVER['SERVER_PORT'] + + + $normalizedFiles[$key] + + $normalizedFiles - + UploadedFileInterface[] - + $attribute $attribute $attribute - - $this->stream + + stream]]> - - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) - isset($this->stream) + + (int) $whence + + + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> + stream)]]> - - - $this->stream - $this->stream - - - + $result - + '' === $relativePath - + $contents - + throw $ex; throw $ex; - + $contents $handle diff --git a/vendor-bin/php-cs-fixer/composer.json b/vendor-bin/php-cs-fixer/composer.json index a33ba1e4..c9dd5ee4 100644 --- a/vendor-bin/php-cs-fixer/composer.json +++ b/vendor-bin/php-cs-fixer/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "3.10.0" + "friendsofphp/php-cs-fixer": "3.16.0" }, "config": { "preferred-install": "dist" diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 668e0777..711507cb 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,8 +1,8 @@ { "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "1.8.2", - "phpstan/phpstan-deprecation-rules": "1.0.0" + "phpstan/phpstan": "1.10.11", + "phpstan/phpstan-deprecation-rules": "1.1.3" }, "config": { "preferred-install": "dist" diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index c19c19a7..ab96f2ca 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "psalm/phar": "4.26.0" + "psalm/phar": "5.9.0" }, "config": { "preferred-install": "dist"