From 3738e1bdfb6a37ee61cadcef1c9a56269b923457 Mon Sep 17 00:00:00 2001 From: Alexander Schnitzler <git@alexanderschnitzler.de> Date: Fri, 1 May 2020 10:48:47 +0200 Subject: [PATCH] [!!!][TASK] Remove deprecated method TypeHandlingUtility::hex2bin The method is removed in favor of PHP's native hex2bin() function. Releases: master Resolves: #91529 Related: #91473 Change-Id: Ife685202e8210b3db872ff9989c5b94e351e29e6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64378 Tested-by: Benni Mack <benni@typo3.org> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> --- ...g-91473-DeprecatedFunctionalityRemoved.rst | 1 + .../Classes/Utility/TypeHandlingUtility.php | 22 ------------------- .../Php/MethodCallStaticMatcher.php | 1 + 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst index ca2233395459..84a1663e882d 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst @@ -46,6 +46,7 @@ The following PHP static class methods that have been previously deprecated for - :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::presetApplicationContext` - :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::resetApplicationContext` - :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::verifyFilenameAgainstDenyPattern` +- :php:`\TYPO3\CMS\Extbase\Utility\TypeHandlingUtility::hex2bin` The following PHP methods have been additionally deprecated and are a no-op now: diff --git a/typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php b/typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php index 5bc65ee573ea..4f1ce087b53c 100644 --- a/typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php +++ b/typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php @@ -160,26 +160,4 @@ class TypeHandlingUtility { return is_iterable($value); } - - /** - * Converts a hex encoded string into binary data - * - * @param string $hexadecimalData A hex encoded string of data - * @return string A binary string decoded from the input - * @deprecated - */ - public static function hex2bin(string $hexadecimalData): string - { - trigger_error( - 'Method ' . __METHOD__ . ' will be removed in TYPO3 11.0, use native hex2bin instead.', - E_USER_DEPRECATED - ); - - $binaryData = ''; - $length = strlen($hexadecimalData); - for ($i = 0; $i < $length; $i += 2) { - $binaryData .= pack('C', hexdec(substr($hexadecimalData, $i, 2))); - } - return $binaryData; - } } diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php index 318b2fceaf26..74006a745d9b 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php @@ -853,6 +853,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-87613-DeprecateTYPO3CMSExtbaseUtilityTypeHandlingUtilityhex2bin.rst', + 'Breaking-91473-DeprecatedFunctionalityRemoved.rst' ], ], 'TYPO3\CMS\Core\Utility\GeneralUtility::idnaEncode' => [ -- GitLab