From 2ed7d655fa70ac7daf5167858434585637b387f5 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 25 Mar 2024 12:58:12 +0100 Subject: [PATCH] phpstan: Separate baseline by php version --- phpstan-baseline-7x.neon | 16 ++++++++++++++++ phpstan-baseline-8x.neon | 6 ++++++ phpstan-baseline-by-php-version.php | 13 +++++++++++++ ...seline.neon => phpstan-baseline-standard.neon | 5 ----- phpstan.neon | 3 ++- 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 phpstan-baseline-7x.neon create mode 100644 phpstan-baseline-8x.neon create mode 100644 phpstan-baseline-by-php-version.php rename phpstan-baseline.neon => phpstan-baseline-standard.neon (99%) diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon new file mode 100644 index 0000000..6e4c763 --- /dev/null +++ b/phpstan-baseline-7x.neon @@ -0,0 +1,16 @@ +parameters: + ignoreErrors: + - + message: "#^Method Icinga\\\\Module\\\\Cube\\\\Ido\\\\IdoHostStatusCube\\:\\:listAvailableDimensions\\(\\) should return array but returns array\\\\|false\\.$#" + count: 1 + path: library/Cube/Ido/IdoHostStatusCube.php + + - + message: "#^Method Icinga\\\\Module\\\\Cube\\\\Ido\\\\IdoServiceStatusCube\\:\\:listAvailableDimensions\\(\\) should return array but returns array\\\\|false\\.$#" + count: 1 + path: library/Cube/Ido/IdoServiceStatusCube.php + + - + message: "#^Parameter \\#1 \\$function of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Zend_Db_Select, string\\} given\\.$#" + count: 1 + path: library/Cube/Ido/ZfSelectWrapper.php diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon new file mode 100644 index 0000000..7ea3ac5 --- /dev/null +++ b/phpstan-baseline-8x.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Zend_Db_Select, string\\} given\\.$#" + count: 1 + path: library/Cube/Ido/ZfSelectWrapper.php diff --git a/phpstan-baseline-by-php-version.php b/phpstan-baseline-by-php-version.php new file mode 100644 index 0000000..97ab099 --- /dev/null +++ b/phpstan-baseline-by-php-version.php @@ -0,0 +1,13 @@ + $includes +]; diff --git a/phpstan-baseline.neon b/phpstan-baseline-standard.neon similarity index 99% rename from phpstan-baseline.neon rename to phpstan-baseline-standard.neon index 99bd797..6a78bcf 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline-standard.neon @@ -985,11 +985,6 @@ parameters: count: 1 path: library/Cube/Ido/ZfSelectWrapper.php - - - message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Zend_Db_Select, string\\} given\\.$#" - count: 1 - path: library/Cube/Ido/ZfSelectWrapper.php - - message: "#^Parameter \\#1 \\$rule of method ipl\\\\Stdlib\\\\Filter\\\\Chain\\:\\:add\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 diff --git a/phpstan.neon b/phpstan.neon index d400f2c..27fce80 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ includes: - - phpstan-baseline.neon + - phpstan-baseline-standard.neon + - phpstan-baseline-by-php-version.php parameters: level: max