Skip to content

Commit

Permalink
Upgrade actions and SA tools (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 20, 2022
1 parent b71e948 commit a7b4320
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Composer normalize
uses: docker://ergebnis/composer-normalize-action
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
extensions: mbstring

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: composer update --no-interaction --prefer-stable --prefer-lowest --no-progress
Expand All @@ -45,7 +45,7 @@ jobs:
extensions: mbstring

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Mimic PHP 8.0
run: composer config platform.php 8.0.999
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Expand Up @@ -24,7 +24,7 @@ jobs:
coverage: none

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Mimic PHP 8.0
run: composer config platform.php 8.0.999
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static.yml
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -63,7 +63,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
198 changes: 179 additions & 19 deletions phpstan-baseline.neon
@@ -1,5 +1,20 @@
parameters:
ignoreErrors:
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/AppendStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/CachingStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/DroppingStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn___toString\\.$#"
count: 1
Expand All @@ -16,17 +31,27 @@ parameters:
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getSize\\.$#"
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_eof\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_tell\\.$#"
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getContents\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_eof\\.$#"
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getMetadata\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getSize\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_isReadable\\.$#"
count: 1
path: src/FnStream.php

Expand All @@ -35,6 +60,16 @@ parameters:
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_isWritable\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_read\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_rewind\\.$#"
count: 1
Expand All @@ -46,7 +81,7 @@ parameters:
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_isWritable\\.$#"
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_tell\\.$#"
count: 1
path: src/FnStream.php

Expand All @@ -56,22 +91,62 @@ parameters:
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_isReadable\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:__toString\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_read\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:detach\\(\\) should return resource\\|null but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getContents\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:eof\\(\\) should return bool but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Access to an undefined property GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:\\$_fn_getMetadata\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:getContents\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:getSize\\(\\) should return int\\|null but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:isReadable\\(\\) should return bool but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:isSeekable\\(\\) should return bool but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:isWritable\\(\\) should return bool but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:read\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:tell\\(\\) should return int but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\FnStream\\:\\:write\\(\\) should return int but returns mixed\\.$#"
count: 1
path: src/FnStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/FnStream.php

Expand All @@ -81,14 +156,19 @@ parameters:
path: src/Header.php

-
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|null given\\.$#"
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/Message.php
path: src/InflateStream.php

-
message: "#^Variable \\$headerLines in PHPDoc tag @var does not match assigned variable \\$count\\.$#"
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/Message.php
path: src/LazyOpenStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/LimitStream.php

-
message: "#^Parameter \\#1 \\$haystack of function substr_count expects string, string\\|null given\\.$#"
Expand All @@ -101,37 +181,92 @@ parameters:
path: src/Message.php

-
message: "#^Parameter \\#1 \\$path of function basename expects string, string\\|null given\\.$#"
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|null given\\.$#"
count: 1
path: src/MultipartStream.php
path: src/Message.php

-
message: "#^Variable \\$headerLines in PHPDoc tag @var does not match assigned variable \\$count\\.$#"
count: 1
path: src/Message.php

-
message: "#^Parameter \\#1 \\$filename of static method GuzzleHttp\\\\Psr7\\\\MimeType\\:\\:fromFilename\\(\\) expects string, string\\|null given\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\MultipartStream\\:\\:getHeader\\(\\) has no return type specified\\.$#"
count: 1
path: src/MultipartStream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\MultipartStream\\:\\:getHeader\\(\\) has no return typehint specified\\.$#"
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/MultipartStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/NoSeekStream.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, mixed given\\.$#"
count: 1
path: src/PumpStream.php

-
message: "#^Parameter \\#1 \\$string of method GuzzleHttp\\\\Psr7\\\\BufferStream\\:\\:write\\(\\) expects string, mixed given\\.$#"
count: 1
path: src/PumpStream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
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\\<Psr\\\\Http\\\\Message\\\\UploadedFileInterface\\> but returns array\\<int\\|string, array\\<Psr\\\\Http\\\\Message\\\\UploadedFileInterface\\>\\|Psr\\\\Http\\\\Message\\\\UploadedFileInterface\\>\\.$#"
count: 1
path: src/ServerRequest.php

-
message: "#^Offset 'size' on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: int, 4\\: int, 5\\: int, 6\\: int, 7\\: int, \\.\\.\\.\\} in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: src/Stream.php

-
message: "#^Property GuzzleHttp\\\\Psr7\\\\Stream\\:\\:\\$stream \\(resource\\) in isset\\(\\) is not nullable\\.$#"
count: 10
path: src/Stream.php

-
message: "#^Property GuzzleHttp\\\\Psr7\\\\Stream\\:\\:\\$uri \\(string\\|null\\) does not accept mixed\\.$#"
count: 1
path: src/Stream.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/Stream.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\StreamWrapper\\:\\:getResource\\(\\) should return resource but returns resource\\|false\\.$#"
count: 1
path: src/StreamWrapper.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\UploadedFile\\:\\:isStringNotEmpty\\(\\) has parameter \\$param with no typehint specified\\.$#"
message: "#^Method GuzzleHttp\\\\Psr7\\\\UploadedFile\\:\\:isStringNotEmpty\\(\\) has parameter \\$param with no type specified\\.$#"
count: 1
path: src/UploadedFile.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\Uri\\:\\:filterUserInfoComponent\\(\\) should return string but returns string\\|null\\.$#"
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Uri.php

Expand All @@ -145,6 +280,16 @@ parameters:
count: 1
path: src/Uri.php

-
message: "#^Method GuzzleHttp\\\\Psr7\\\\Uri\\:\\:filterUserInfoComponent\\(\\) should return string but returns string\\|null\\.$#"
count: 1
path: src/Uri.php

-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(int\\|string\\)\\: mixed\\)\\|null, 'urldecode' given\\.$#"
count: 1
path: src/Uri.php

-
message: "#^Parameter \\#1 \\$path of method Psr\\\\Http\\\\Message\\\\UriInterface\\:\\:withPath\\(\\) expects string, string\\|null given\\.$#"
count: 3
Expand All @@ -155,13 +300,23 @@ parameters:
count: 2
path: src/UriNormalizer.php

-
message: "#^Strict comparison using \\=\\=\\= between '' and non\\-empty\\-string will always evaluate to false\\.$#"
count: 1
path: src/UriResolver.php

-
message: "#^Offset 'uri' on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\} on left side of \\?\\? always exists and is not nullable\\.$#"
count: 1
path: src/Utils.php

-
message: "#^Parameter \\#1 \\$keys of static method GuzzleHttp\\\\Psr7\\\\Utils\\:\\:caselessRemove\\(\\) expects array\\<string\\>, array\\<int, int\\|string\\> given\\.$#"
count: 1
path: src/Utils.php

-
message: "#^Variable \\$handle might not be defined\\.$#"
message: "#^Parameter \\#1 \\$source of class GuzzleHttp\\\\Psr7\\\\PumpStream constructor expects callable\\(int\\)\\: string\\|false\\|null, Closure\\(\\)\\: mixed given\\.$#"
count: 1
path: src/Utils.php

Expand All @@ -170,3 +325,8 @@ parameters:
count: 1
path: src/Utils.php

-
message: "#^Variable \\$handle might not be defined\\.$#"
count: 1
path: src/Utils.php

0 comments on commit a7b4320

Please sign in to comment.