You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: phpstan.neon.dist
+26-5
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,43 @@ parameters:
5
5
paths:
6
6
- src
7
7
ignoreErrors:
8
+
# Exception still thrown in PHP 8, not sure why phpstan complains
8
9
-
9
-
message: "#^Cannot call method createStream\\(\\) on Psr\\\\Http\\\\Message\\\\StreamFactoryInterface\\|null\\.$#"
10
-
count: 1
11
-
path: src/HttpMethodsClient.php
10
+
message: "#^Dead catch - UnexpectedValueException is never thrown in the try block\\.$#"
11
+
count: 2
12
+
path: src/BatchResult.php
12
13
13
14
-
14
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addSuccess\\(\\) has no return typehint specified\\.$#"
15
+
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addSuccess\\(\\) has no return type specified\\.$#"
15
16
count: 1
16
17
path: src/Plugin/Journal.php
17
18
18
19
-
19
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addFailure\\(\\) has no return typehint specified\\.$#"
20
+
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addFailure\\(\\) has no return type specified\\.$#"
20
21
count: 1
21
22
path: src/Plugin/Journal.php
22
23
23
24
-
24
25
message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\:\\:sendRequest\\(\\)\\.$#"
25
26
count: 1
26
27
path: src/PluginClient.php
28
+
29
+
-
30
+
message: "#^Method Http\\\\Client\\\\Common\\\\EmulatedHttpClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
31
+
count: 1
32
+
path: src/EmulatedHttpClient.php
33
+
34
+
-
35
+
message: "#^Anonymous function should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
36
+
count: 1
37
+
path: src/Plugin/RedirectPlugin.php
38
+
39
+
-
40
+
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\RetryPlugin\\:\\:retry\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
41
+
count: 1
42
+
path: src/Plugin/RetryPlugin.php
43
+
44
+
-
45
+
message: "#^Method Http\\\\Client\\\\Common\\\\PluginClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
* @var bool $use_content_encoding Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true).
37
-
* }
36
+
* Configuration options:
37
+
* - use_content_encoding: Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true).
* @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up
62
-
* @var callable $error_response_decider A callback that gets a request and response to decide whether the request should be retried
63
-
* @var callable $exception_decider A callback that gets a request and an exception to decide after a failure whether the request should be retried
64
-
* @var callable $error_response_delay A callback that gets a request and response and the current number of retries and returns how many microseconds we should wait before trying again
65
-
* @var callable $exception_delay A callback that gets a request, an exception and the current number of retries and returns how many microseconds we should wait before trying again
66
-
* }
61
+
* Configuration options:
62
+
* - retries: Number of retries to attempt if an exception occurs before letting the exception bubble up
63
+
* - error_response_decider: A callback that gets a request and response to decide whether the request should be retried
64
+
* - exception_decider: A callback that gets a request and an exception to decide after a failure whether the request should be retried
65
+
* - error_response_delay: A callback that gets a request and response and the current number of retries and returns how many microseconds we should wait before trying again
66
+
* - exception_delay: A callback that gets a request, an exception and the current number of retries and returns how many microseconds we should wait before trying again
67
67
*/
68
68
publicfunction__construct(array$config = [])
69
69
{
@@ -115,6 +115,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
115
115
}
116
116
117
117
if (call_user_func($this->errorResponseDecider, $request, $response)) {
0 commit comments