Closed wtfred closed 3 days ago
->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
Is leading to:
- ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)); + ->setIcon($this->iconFactory->getIcon('actions-refresh', IconSize::SMALL->value));
ConstantsToBackedEnumValueRector
- ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)); + ->setIcon($this->iconFactory->getIcon('actions-refresh', IconSize::SMALL));
2.11.0
8.3.12
13.4.1
In vendor/typo3/cms-core/Classes/Imaging/IconFactory.php
vendor/typo3/cms-core/Classes/Imaging/IconFactory.php
There is this block that is triggering deprecation if code is migrated to IconSize::SMALL->value
IconSize::SMALL->value
if (is_string($size)) { $size = IconSize::from($size); $size->triggerDeprecation(); }
Relates: #3698
Thank you, the migration in #3698 was indeed done wrong.
Minimal PHP Code Causing Issue
->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
Is leading to:
Applied rules
ConstantsToBackedEnumValueRector
Expected Behaviour
Package Version
2.11.0
PHP Version
8.3.12
TYPO3 Version
13.4.1
Notes
In
vendor/typo3/cms-core/Classes/Imaging/IconFactory.php
There is this block that is triggering deprecation if code is migrated to
IconSize::SMALL->value
Relates: #3698