From 5897b226e43102dd7dace18eb135b030236b95a8 Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Mon, 1 Dec 2025 12:01:58 +0100 Subject: [PATCH 1/3] Mark typed parameters that default to null as nullable to ensure PHP 8.4 compatibility Remove duplicate null in docstring --- src/Common/BaseTableRowItem.php | 2 +- src/Common/StateBadges.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/BaseTableRowItem.php b/src/Common/BaseTableRowItem.php index 9149a774..fd21a0dd 100644 --- a/src/Common/BaseTableRowItem.php +++ b/src/Common/BaseTableRowItem.php @@ -29,7 +29,7 @@ abstract class BaseTableRowItem extends BaseHtmlElement * @param object $item * @param BaseItemTable|null $table */ - public function __construct($item, BaseItemTable $table = null) + public function __construct($item, ?BaseItemTable $table = null) { $this->item = $item; $this->table = $table; diff --git a/src/Common/StateBadges.php b/src/Common/StateBadges.php index e6e9cfda..52689eb1 100644 --- a/src/Common/StateBadges.php +++ b/src/Common/StateBadges.php @@ -109,7 +109,7 @@ public function setUrl(Url $url): self * * @return Link */ - public function createLink($content, array $filter = null): Link + public function createLink($content, ?array $filter = null): Link { $url = clone $this->getUrl(); From ac9f9a3c5c4f04b2e69f59dae2200893627233df Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Wed, 3 Dec 2025 08:39:19 +0100 Subject: [PATCH 2/3] Cleanup phpstan-baseline --- phpstan-baseline-8x.neon | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon index 8d27b270..f11b4e41 100644 --- a/phpstan-baseline-8x.neon +++ b/phpstan-baseline-8x.neon @@ -1,46 +1,49 @@ parameters: ignoreErrors: - - message: "#^Parameter \\#2 \\$values of function vsprintf expects array\\, array\\ given\\.$#" + message: '#^Parameter \#2 \$values of function vsprintf expects array\, array\ given\.$#' + identifier: argument.type count: 1 path: src/Compat/CompatController.php - - message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\|false given\\.$#" + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\|false given\.$#' + identifier: argument.type count: 1 path: src/Control/SearchBar/Suggestions.php - - message: "#^Parameter \\#1 \\$string of function rawurlencode expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$string of function rawurlencode expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/Control/SearchBar/Terms.php - - message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" + message: '#^Parameter \#2 \$string of function explode expects string, int\|string\|null given\.$#' + identifier: argument.type count: 1 path: src/Control/SortControl.php - - message: "#^Parameter \\#2 \\$string of function explode expects string, int\\|string\\|null given\\.$#" - count: 1 - path: src/Control/SortControl.php - - - - message: "#^Parameter \\#1 \\$column of method ipl\\\\Web\\\\Filter\\\\Parser\\:\\:createCondition\\(\\) expects string, string\\|false given\\.$#" + message: '#^Parameter \#1 \$column of method ipl\\Web\\Filter\\Parser\:\:createCondition\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 path: src/Filter/Parser.php - - message: "#^Parameter \\#1 \\$string of function rawurlencode expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$string of function rawurlencode expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/Filter/Renderer.php - - message: "#^Parameter \\#1 \\$array of function array_push expects array, mixed given\\.$#" + message: '#^Parameter \#1 \$array of function array_push expects array, mixed given\.$#' + identifier: argument.type count: 1 path: src/FormElement/TermInput.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, string\\|null given\\.$#" + message: '#^Parameter \#1 \$content of static method ipl\\Html\\Text\:\:create\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 path: src/Widget/Tabs.php From 78d12bec2be3b4d9fb638945124237b0256c04a8 Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Thu, 4 Dec 2025 12:58:33 +0100 Subject: [PATCH 3/3] Replace null as array key with an empty string to ensure PHP-8.5 compatibility --- src/FormElement/SearchSuggestions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormElement/SearchSuggestions.php b/src/FormElement/SearchSuggestions.php index 0218d43f..8f2351eb 100644 --- a/src/FormElement/SearchSuggestions.php +++ b/src/FormElement/SearchSuggestions.php @@ -231,7 +231,7 @@ protected function assemble(): void if ($groupingCallback) { $provider = yield_groups($this->provider, $groupingCallback); } else { - $provider = [null => $this->provider]; + $provider = ['' => $this->provider]; } /** @var iterable>> $provider */