From 11dd897486dcbff8e4634e27fe929a2d64d38498 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 24 May 2021 16:35:30 +0200 Subject: [PATCH] fix code rot in ci setup --- .github/workflows/static.yml | 2 +- phpstan-baseline.neon | 27 +++++++++++---------------- src/Authentication/QueryParam.php | 2 +- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index b2f69cf..6530f18 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -31,6 +31,6 @@ jobs: uses: actions/checkout@v2 - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga + uses: docker://oskarstark/php-cs-fixer-ga:2.19.0 with: args: --dry-run --diff-format udiff diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9c95e48..40013ca 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -11,17 +11,17 @@ parameters: path: src/Authentication/Header.php - - message: "#^Property Http\\\\Message\\\\Authentication\\\\QueryParam\\:\\:\\$params type has no value type specified in iterable type array\\.$#" + message: "#The Http\\\\Message\\\\Authentication\\\\Matching class is deprecated since version 1.2 and will be removed in 2.0.#" count: 1 - path: src/Authentication/QueryParam.php + path: src/Authentication/Matching.php - - message: "#^Method Http\\\\Message\\\\Authentication\\\\QueryParam\\:\\:__construct\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#" + message: "#^Property Http\\\\Message\\\\Authentication\\\\QueryParam\\:\\:\\$params type has no value type specified in iterable type array\\.$#" count: 1 path: src/Authentication/QueryParam.php - - message: "#^Parameter \\#2 \\$prefix of function http_build_query expects string, null given\\.$#" + message: "#^Method Http\\\\Message\\\\Authentication\\\\QueryParam\\:\\:__construct\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#" count: 1 path: src/Authentication/QueryParam.php @@ -46,7 +46,7 @@ parameters: path: src/Cookie.php - - message: "#^Parameter \\#2 \\$str2 of function strcasecmp expects string, string\\|null given\\.$#" + message: "#^Parameter \\#2 \\$string2 of function strcasecmp expects string, string\\|null given\\.$#" count: 1 path: src/Cookie.php @@ -76,7 +76,7 @@ parameters: path: src/Cookie.php - - message: "#^Parameter \\#1 \\$str of function rtrim expects string, string\\|null given\\.$#" + message: "#^Parameter \\#1 \\$string of function rtrim expects string, string\\|null given\\.$#" count: 1 path: src/Cookie.php @@ -160,16 +160,6 @@ parameters: count: 2 path: src/Encoding/Filter/Chunk.php - - - message: "#^Parameter \\#2 \\$bucket of function stream_bucket_append expects object, resource given\\.$#" - count: 2 - path: src/Encoding/Filter/Chunk.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: src/Encoding/Filter/Chunk.php - - message: "#^Method Http\\\\Message\\\\Encoding\\\\FilteredStream\\:\\:fill\\(\\) has no return typehint specified\\.$#" count: 1 @@ -215,6 +205,11 @@ parameters: count: 1 path: src/MessageFactory/SlimMessageFactory.php + - + message: "#The Http\\\\Message\\\\RequestMatcher\\\\RegexRequestMatcher class is deprecated since version 1.2 and will be removed in 2.0.#" + count: 1 + path: src/RequestMatcher/RegexRequestMatcher.php + - message: "#^Property Http\\\\Message\\\\RequestMatcher\\\\RequestMatcher\\:\\:\\$methods type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/Authentication/QueryParam.php b/src/Authentication/QueryParam.php index 7f95d44..243efef 100644 --- a/src/Authentication/QueryParam.php +++ b/src/Authentication/QueryParam.php @@ -38,7 +38,7 @@ public function authenticate(RequestInterface $request) $params = array_merge($params, $this->params); - $query = http_build_query($params, null, '&'); + $query = http_build_query($params, '', '&'); $uri = $uri->withQuery($query);