From 9de5211f02e286975a13e0c10324d2942ee3ac91 Mon Sep 17 00:00:00 2001 From: Dominic Tubach Date: Mon, 8 Jan 2024 12:13:23 +0100 Subject: [PATCH] Update phpstan rules --- phpstan.neon.dist | 2 +- .../Unit/Form/ResponseHandler/FormResponseHandlerActionTest.php | 2 +- tools/phpstan/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9a30aad..a3999ac 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -38,8 +38,8 @@ parameters: - '/ no value type specified in iterable type Drupal\\file\\FileInterface/' - '/^Access to an undefined property Drupal\\Core\\Field\\FieldItemListInterface::\$(value|entity|target_id).$/' - '/::delete\(\) should be contravariant with parameter \$entities \(array\) of method Drupal\\Core\\Entity\\[^\s]+::delete\(\)$/' + - '/^Concat: Do not cast objects magically, please use `__toString` here, Drupal\\Core\\StringTranslation\\TranslatableMarkup and .+ found.$/' - - "/^Do not compare objects directly, Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup and '.+' found.$/" - '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::getInfo\(\) return type has no value type specified in iterable type array.$/' - '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::preRender[^\s]+\(\) has parameter \$element with no value type specified in iterable type array.$/' - '/^Method Drupal\\civiremote_funding\\Element\\[^\s]+::preRender[^\s]+\(\) return type has no value type specified in iterable type array.$/' diff --git a/tests/src/Unit/Form/ResponseHandler/FormResponseHandlerActionTest.php b/tests/src/Unit/Form/ResponseHandler/FormResponseHandlerActionTest.php index f3b50e8..4f61600 100644 --- a/tests/src/Unit/Form/ResponseHandler/FormResponseHandlerActionTest.php +++ b/tests/src/Unit/Form/ResponseHandler/FormResponseHandlerActionTest.php @@ -52,7 +52,7 @@ final class FormResponseHandlerActionTest extends TestCase { private FormResponseHandlerAction $handler; /** - * @var \Drupal\Core\Http\RequestStack&\PHPUnit\Framework\MockObject\MockObject + * @var \Symfony\Component\HttpFoundation\RequestStack&\PHPUnit\Framework\MockObject\MockObject */ private MockObject $requestStackMock; diff --git a/tools/phpstan/composer.json b/tools/phpstan/composer.json index 560f168..756d893 100644 --- a/tools/phpstan/composer.json +++ b/tools/phpstan/composer.json @@ -7,7 +7,7 @@ "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.2", "thecodingmachine/phpstan-strict-rules": "^1.0", - "voku/phpstan-rules": "^1.6" + "voku/phpstan-rules": "^3.2" }, "config": { "allow-plugins": {