From 3933c27dedbe5fe98a6406c8ec457fd8d3796f55 Mon Sep 17 00:00:00 2001 From: Oliver Bartsch <bo@cedev.de> Date: Mon, 29 Nov 2021 16:41:39 +0100 Subject: [PATCH] [!!!][TASK] Remove possibility to pass record uid to AbstractTreeView::getIcon() It's no longer possible to pass a records' uid to AbstractTreeView::getIcon(), since the methods first argument "$row" is now type hinted "array". Resolves: #96144 Related: #92922 Releases: main Change-Id: I0cf19bb361720905ee05140c611a7d8fafa00df5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72380 Tested-by: core-ci <typo3@b13.com> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Benni Mack <benni@typo3.org> --- .../backend/Classes/Tree/View/AbstractTreeView.php | 13 +------------ ...reaking-96107-DeprecatedFunctionalityRemoved.rst | 4 ++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php index a3fa73e8196a..aeea25281f0b 100644 --- a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php +++ b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php @@ -334,19 +334,8 @@ abstract class AbstractTreeView * @param array $row The row to get the icon for * @return string The icon markup, wrapped into a span tag, with the records title as title attribute */ - public function getIcon($row): string + public function getIcon(array $row): string { - if (is_int($row)) { - trigger_error( - 'Calling ' . __METHOD__ . ' with argument $row containing the records uid is deprecated and will be removed in v12. Use the full row instead.', - E_USER_DEPRECATED - ); - - $row = BackendUtility::getRecord($this->table, $row); - if ($row === null) { - return ''; - } - } $title = $this->getTitleAttrib($row); $iconFactory = GeneralUtility::makeInstance(IconFactory::class); $icon = $row['is_siteroot'] ? $iconFactory->getIcon('apps-pagetree-folder-root', Icon::SIZE_SMALL) : $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL); diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst index 2d62f89cab54..679f97f0e4fa 100644 --- a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst @@ -48,6 +48,10 @@ The following methods changed signature according to previous deprecations in v1 - :php:`\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->ATagParams` (argument 2 is removed) +The following methods changed signature according to previous deprecations in v11 and are now type hinted: + +- :php:`\TYPO3\CMS\Backend\Tree\View\AbstractTreeView->getIcon` (first argument is now type hinted `array`) + The following public class properties have been dropped: - :php:`\Full\Class\Name->propertyName` -- GitLab