From 216024a3c0605729537c121485c17c1bfeec589a Mon Sep 17 00:00:00 2001
From: Larry Garfield <larry@garfieldtech.com>
Date: Sat, 9 Jul 2022 00:02:22 +0200
Subject: [PATCH] [!!!][TASK] Add native typehints for GeneralUtility
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolves: #97880
Releases: main
Change-Id: I582ee8b408ef3df97e0ca9696de95083a9c49bc0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75077
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
---
 typo3/sysext/core/Classes/Utility/GeneralUtility.php       | 2 +-
 ...97210-TypesAddedToMethodSignaturesOrClassProperties.rst | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php
index 1a72be3d86f1..edb848f9413b 100644
--- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php
+++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php
@@ -3213,7 +3213,7 @@ class GeneralUtility
      * @throws \RuntimeException
      * @return object|string[]|false The service object or an array with error infos, or false if no service was found.
      */
-    public static function makeInstanceService($serviceType, $serviceSubType = '', array $excludeServiceKeys = [])
+    public static function makeInstanceService(string $serviceType, string $serviceSubType = '', array $excludeServiceKeys = []): array|object|false
     {
         $error = false;
         $requestInfo = [
diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97210-TypesAddedToMethodSignaturesOrClassProperties.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97210-TypesAddedToMethodSignaturesOrClassProperties.rst
index 4be2148b68fb..bea909b93547 100644
--- a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97210-TypesAddedToMethodSignaturesOrClassProperties.rst
+++ b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97210-TypesAddedToMethodSignaturesOrClassProperties.rst
@@ -9,9 +9,9 @@ See :issue:`97210`
 Description
 ===========
 
-The following PHP classes have had parameter and return types added to their method
-signatures. The types are consistent with existing docblock-documented type
-expectations and existing behavior.
+The following PHP classes have had parameter and return types added to some or
+all of their method signatures. The types are consistent with existing
+docblock-documented type expectations and existing behavior.
 
 - :php:`\TYPO3\CMS\Core\Utility\ArrayUtility`
 - :php:`\TYPO3\CMS\Core\Utility\ClassNamingUtility`
@@ -20,6 +20,7 @@ expectations and existing behavior.
 - :php:`\TYPO3\CMS\Core\Utility\DebugUtility`
 - :php:`\TYPO3\CMS\Core\Utility\DiffUtility`
 - :php:`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility`
+- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility`
 - :php:`\TYPO3\CMS\Core\Utility\MailUtility`
 - :php:`\TYPO3\CMS\Core\Utility\MathUtility`
 - :php:`\TYPO3\CMS\Core\Utility\PathUtility`
-- 
GitLab