From bb22e6db3a8aa231e4b3ebf2319f5fd2f315b06e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 27 Nov 2023 14:44:49 +0100 Subject: [PATCH] I'm not sure whether to hate phpstan or php --- phpstan-baseline-8.2+.neon | 6 ++++++ phpstan-baseline-by-php-version.php | 6 ++++++ phpstan-baseline-pre-8.2.neon | 6 ++++++ phpstan-baseline-standard.neon | 5 ----- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 phpstan-baseline-8.2+.neon create mode 100644 phpstan-baseline-pre-8.2.neon diff --git a/phpstan-baseline-8.2+.neon b/phpstan-baseline-8.2+.neon new file mode 100644 index 00000000..083123c0 --- /dev/null +++ b/phpstan-baseline-8.2+.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects iterable, ipl\\\\Orm\\\\Model\\|null given\\.$#" + count: 1 + path: application/controllers/EventRuleController.php diff --git a/phpstan-baseline-by-php-version.php b/phpstan-baseline-by-php-version.php index 4bd791e8..05389431 100644 --- a/phpstan-baseline-by-php-version.php +++ b/phpstan-baseline-by-php-version.php @@ -7,6 +7,12 @@ $includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; } +if (PHP_VERSION_ID >= 80200) { + $includes[] = __DIR__ . '/phpstan-baseline-8.2+.neon'; +} else { + $includes[] = __DIR__ . '/phpstan-baseline-pre-8.2.neon'; +} + return [ 'includes' => $includes ]; diff --git a/phpstan-baseline-pre-8.2.neon b/phpstan-baseline-pre-8.2.neon new file mode 100644 index 00000000..ed41ceec --- /dev/null +++ b/phpstan-baseline-pre-8.2.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, ipl\\\\Orm\\\\Model\\|null given\\.$#" + count: 1 + path: application/controllers/EventRuleController.php diff --git a/phpstan-baseline-standard.neon b/phpstan-baseline-standard.neon index a1b08c55..dd363737 100644 --- a/phpstan-baseline-standard.neon +++ b/phpstan-baseline-standard.neon @@ -175,11 +175,6 @@ parameters: count: 3 path: application/controllers/EventRuleController.php - - - message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects iterable, ipl\\\\Orm\\\\Model\\|null given\\.$#" - count: 1 - path: application/controllers/EventRuleController.php - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:delete\\(\\) expects string, mixed given\\.$#" count: 3