From 0cb46591c1637101f2c9ebd1efe17aa744179b6b Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 28 Jan 2021 17:41:44 +0100 Subject: [PATCH 1/2] Remove phpstan false-positive --- phpstan.neon.dist | 6 ------ tests/Behat/JsonContext.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 35e32f8b377..131f24fe529 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -118,9 +118,3 @@ parameters: - message: "#Call to function method_exists\\(\\) with ApiPlatform\\\\Core\\\\JsonApi\\\\Serializer\\\\ItemNormalizer and 'setCircularReferenc…' will always evaluate to false\\.#" path: tests/JsonApi/Serializer/ItemNormalizerTest.php - # Waiting to be fixed by https://github.com/Roave/BetterReflection/issues/663 - - - message: '#Call to private method getNestedFieldPath\(\) of class ApiPlatform\\Core\\Bridge\\Elasticsearch\\DataProvider\\Filter\\AbstractFilter\.#' - paths: - - src/Bridge/Elasticsearch/DataProvider/Filter/OrderFilter.php - - src/Bridge/Elasticsearch/DataProvider/Filter/AbstractSearchFilter.php diff --git a/tests/Behat/JsonContext.php b/tests/Behat/JsonContext.php index 5323faa32e7..4986aa2c6a2 100644 --- a/tests/Behat/JsonContext.php +++ b/tests/Behat/JsonContext.php @@ -107,6 +107,6 @@ public function theJsonIsASupersetOf(PyStringNode $content) $array = json_decode($this->httpCallResultPool->getResult()->getValue(), true); $subset = json_decode($content->getRaw(), true); - method_exists(Assert::class, 'assertArraySubset') ? Assert::assertArraySubset($subset, $array) : ApiTestCase::assertArraySubset($subset, $array); // @phpstan-ignore-line Compatibility with PHPUnit 7 + method_exists(Assert::class, 'assertArraySubset') ? Assert::assertArraySubset($subset, $array) : ApiTestCase::assertArraySubset($subset, $array); } } From b9607d34f79409b028c60cd2a55929a4bacd5e14 Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 28 Jan 2021 18:00:59 +0100 Subject: [PATCH 2/2] mhh --- tests/Behat/JsonContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Behat/JsonContext.php b/tests/Behat/JsonContext.php index 4986aa2c6a2..5323faa32e7 100644 --- a/tests/Behat/JsonContext.php +++ b/tests/Behat/JsonContext.php @@ -107,6 +107,6 @@ public function theJsonIsASupersetOf(PyStringNode $content) $array = json_decode($this->httpCallResultPool->getResult()->getValue(), true); $subset = json_decode($content->getRaw(), true); - method_exists(Assert::class, 'assertArraySubset') ? Assert::assertArraySubset($subset, $array) : ApiTestCase::assertArraySubset($subset, $array); + method_exists(Assert::class, 'assertArraySubset') ? Assert::assertArraySubset($subset, $array) : ApiTestCase::assertArraySubset($subset, $array); // @phpstan-ignore-line Compatibility with PHPUnit 7 } }