From ee2866331a74505aad45bd3187b7abc9713980c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BCrk?= <stefan@buerk.tech>
Date: Thu, 27 Jun 2024 22:56:30 +0200
Subject: [PATCH] [TASK] Avoid implicitly nullable class method parameter in
 `EXT:indexed_search`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With PHP 8.4 marking method parameter implicitly nullable
is deprecated and will emit a `E_DEPRECATED` warning. One
recommended way to resolve this, is making it explicitly
nullable using the `?` nullable operator or adding a null
tyype to an union type definition. [1]

This prepares the way towards PHP 8.4 compatibility.

[1] https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

Resolves: #104236
Releases: main, 12.4, 11.5
Change-Id: Iba5e99b526ca37d7bb36044cd6ee1027b6c5245a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84972
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
---
 typo3/sysext/indexed_search/Classes/Indexer.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php
index 22a6ab353528..a62bcd293c11 100644
--- a/typo3/sysext/indexed_search/Classes/Indexer.php
+++ b/typo3/sysext/indexed_search/Classes/Indexer.php
@@ -251,7 +251,7 @@ class Indexer
      * Initializes the object.
      * @param array|null $configuration will be used to set $this->conf, otherwise $this->conf MUST be set with proper values prior to this call
      */
-    public function init(array $configuration = null)
+    public function init(?array $configuration = null)
     {
         if (is_array($configuration)) {
             $this->conf = $configuration;
-- 
GitLab