Commit e2a21d2a authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[!!!][TASK] Remove GeneralUtility::uniqueList

In #92607, GeneralUtility::uniqueList was migrated
to StringUtility::uniqueList and is therefore now
removed.

Resolves: #96139
Related: #92607
Releases: main
Change-Id: I3eceb459db75a6cb69ed93126516abc2603ba9f6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72374


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent b6c9758c
......@@ -613,30 +613,6 @@ class GeneralUtility
return $hmac;
}
/**
* Takes comma-separated lists and arrays and removes all duplicates
* If a value in the list is trim(empty), the value is ignored.
*
* @param string $in_list Accept multiple parameters which can be comma-separated lists of values and arrays.
* @param mixed $secondParameter Dummy field, which if set will show a warning!
* @return string Returns the list without any duplicates of values, space around values are trimmed
* @deprecated since TYPO3 v11, will be removed in TYPO3 v12. Use StringUtility::uniqueList() instead.
*/
public static function uniqueList($in_list, $secondParameter = null)
{
trigger_error(
'GeneralUtility::uniqueList() is deprecated and will be removed in v12. Use StringUtility::uniqueList() instead.',
E_USER_DEPRECATED
);
if (is_array($in_list)) {
throw new \InvalidArgumentException('TYPO3 Fatal Error: TYPO3\\CMS\\Core\\Utility\\GeneralUtility::uniqueList() does NOT support array arguments anymore! Only string comma lists!', 1270853885);
}
if (isset($secondParameter)) {
throw new \InvalidArgumentException('TYPO3 Fatal Error: TYPO3\\CMS\\Core\\Utility\\GeneralUtility::uniqueList() does NOT support more than a single argument value anymore. You have specified more than one!', 1270853886);
}
return implode(',', array_unique(self::trimExplode(',', $in_list, true)));
}
/**
* Splits a reference to a file in 5 parts
*
......
......@@ -58,6 +58,7 @@ The following PHP static class methods that have previously been marked as depre
- :php:`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable()`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList()`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::stdAuthCode()`
- :php:`\TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList()`
- :php:`\TYPO3\CMS\Core\Utility\HttpUtility::redirect()`
- :php:`\TYPO3\CMS\Core\Utility\HttpUtility::setResponseCode()`
- :php:`\TYPO3\CMS\Core\Utility\HttpUtility::setResponseCodeAndExit()`
......
......@@ -1065,6 +1065,7 @@ return [
'maximumNumberOfArguments' => 2,
'restFiles' => [
'Deprecation-92607-DeprecatedGeneralUtilityuniqueList.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Database\RelationHandler::isOnSymmetricSide' => [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment