[!!!][TASK] Remove deprecated method TypeHandlingUtility::hex2bin 78/64378/3
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Fri, 1 May 2020 08:48:47 +0000 (10:48 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 29 May 2020 15:32:51 +0000 (17:32 +0200)
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>
typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst
typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php

index ca22333..84a1663 100644 (file)
@@ -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:
 
index 5bc65ee..4f1ce08 100644 (file)
@@ -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;
-    }
 }
index 318b2fc..74006a7 100644 (file)
@@ -853,6 +853,7 @@ return [
         'maximumNumberOfArguments' => 1,
         'restFiles' => [
             'Deprecation-87613-DeprecateTYPO3CMSExtbaseUtilityTypeHandlingUtilityhex2bin.rst',
+            'Breaking-91473-DeprecatedFunctionalityRemoved.rst'
         ],
     ],
     'TYPO3\CMS\Core\Utility\GeneralUtility::idnaEncode' => [