Skip to content

Commit e58af34

Browse files
committed
Loosen phpstan/larastan constraints
`assertIsArray` has been removed because, as phpstan rightly complained, it's not possible otherwise: the return type of `formatError` is always an error
1 parent 030ad0b commit e58af34

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"friendsofphp/php-cs-fixer": "3.37.1",
4848
"mfn/php-cs-fixer-config": "^2",
4949
"mockery/mockery": "^1.2",
50-
"phpstan/phpstan": "1.10.40",
51-
"larastan/larastan": "2.6.4",
50+
"phpstan/phpstan": "^1",
51+
"larastan/larastan": "^2",
5252
"orchestra/testbench": "^7.0|^8.0|^9.0|^9.x-dev",
5353
"phpunit/phpunit": "^9|^10",
5454
"thecodingmachine/phpstan-safe-rule": "^1"

phpstan-baseline.neon

-5
Original file line numberDiff line numberDiff line change
@@ -1415,11 +1415,6 @@ parameters:
14151415
count: 1
14161416
path: tests/Unit/ExecutionMiddlewareTest/ChangeQueryArgTypeMiddleware.php
14171417

1418-
-
1419-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with non\\-empty\\-array will always evaluate to true\\.$#"
1420-
count: 1
1421-
path: tests/Unit/GraphQLTest.php
1422-
14231418
-
14241419
message: "#^Parameter \\#1 \\$abstract of function app expects string\\|null, object\\|string given\\.$#"
14251420
count: 3

tests/Unit/GraphQLTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ public function testFormatError(): void
310310
unset($error['extensions']['file']);
311311
unset($error['extensions']['line']);
312312

313-
self::assertIsArray($error);
314313
self::assertArrayHasKey('message', $error);
315314
self::assertArrayHasKey('locations', $error);
316315
$expectedError = [

0 commit comments

Comments
 (0)