Deprecation: #101475 - Icon::SIZE_* string constants
See forge#101475
Description
The string constants representing icon sizes have been marked as deprecated:
\TYPO3\
CMS\ Core\ Imaging\ Icon:: SIZE_ DEFAULT \TYPO3\
CMS\ Core\ Imaging\ Icon:: SIZE_ SMALL \TYPO3\
CMS\ Core\ Imaging\ Icon:: SIZE_ MEDIUM \TYPO3\
CMS\ Core\ Imaging\ Icon:: SIZE_ LARGE \TYPO3\
CMS\ Core\ Imaging\ Icon:: SIZE_ MEGA
The following methods have been adapted to still accept the deprecated string
constants and the new \TYPO3\
enum:
\TYPO3\
CMS\ Core\ Imaging\ Icon->set Size () \TYPO3\
CMS\ Core\ Imaging\ Icon Factory->get Icon () \TYPO3\
CMS\ Core\ Imaging\ Icon Factory->get Icon For File Extension () \TYPO3\
CMS\ Core\ Imaging\ Icon Factory->get Icon For Record () \TYPO3\
CMS\ Core\ Imaging\ Icon Factory->get Icon For Resource ()
The following method returns the string value of an Icon
enum, but
will be removed in TYPO3 v14:
\TYPO3\
CMS\ Core\ Imaging\ Event\ Modify Icon For Resource Properties Event->get Size ()
Impact
Passing the size as a string in the above mentioned methods will trigger a deprecation log entry.
Affected installations
All installations with third-party extensions using the Icon API are affected.
Migration
Migrate all usages of the aforementioned string constants to the Icon
as follows:
\TYPO3\
->CMS\ Core\ Imaging\ Icon:: SIZE_ DEFAULT \TYPO3\
CMS\ Core\ Imaging\ Icon Size:: DEFAULT \TYPO3\
->CMS\ Core\ Imaging\ Icon:: SIZE_ SMALL \TYPO3\
CMS\ Core\ Imaging\ Icon Size:: SMALL \TYPO3\
->CMS\ Core\ Imaging\ Icon:: SIZE_ MEDIUM \TYPO3\
CMS\ Core\ Imaging\ Icon Size:: MEDIUM \TYPO3\
->CMS\ Core\ Imaging\ Icon:: SIZE_ LARGE \TYPO3\
CMS\ Core\ Imaging\ Icon Size:: LARGE \TYPO3\
->CMS\ Core\ Imaging\ Icon:: SIZE_ MEGA \TYPO3\
CMS\ Core\ Imaging\ Icon Size:: MEGA
Also migrate from \TYPO3\
to \TYPO3\
.