79470[!!!][FEATURE] Deprecate and replace IconState class with enum
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Nikita Hovratov +1
-
Verified V +2 Done
- Benni Mack +2
- Oliver Klee +1
- Nikita Hovratov +1
- core-ci +1 CI
Issues 1
Files 15
- typo3/sysext/core/Classes/Controller/IconController.php+2 −2
- typo3/sysext/core/Classes/Imaging/Icon.php+2 −3
- typo3/sysext/core/Classes/Imaging/IconFactory.php2+20 −5
- typo3/sysext/core/Classes/Imaging/IconState.phpnew+27 −0
- typo3/sysext/core/Classes/Type/Icon/IconState.php+2 −0
- typo3/sysext/core/Classes/ViewHelpers/IconViewHelper.php+3 −3
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-101133-IconFactorySignatureChange.rstnew+39 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-101133-IconStateChangedType.rstnew+57 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-101133-IconStateClass.rstnew+41 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-101133-IconStateEnum.rstnew+45 −0
- typo3/sysext/core/Tests/Functional/ViewHelpers/IconViewHelperTest.php+5 −5
- typo3/sysext/core/Tests/Unit/Imaging/IconTest.php+3 −3
- typo3/sysext/core/Tests/UnitDeprecated/Imaging/IconTest.phpnew+75 −0
- typo3/sysext/install/Classes/Controller/IconController.php2+2 −2
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php+6 −0
Review log 3752
Show 1627 earlier messages
-
Thomas Hohn uploaded patch set 1 06/21/23, 05:02
-
Thomas Hohn uploaded patch set 2 06/21/23, 05:13
-
core-ci voted on patch set 1 V -1 06/21/23, 05:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42859
-
core-ci voted on patch set 2 V -1 06/21/23, 05:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42861
-
Thomas Hohn uploaded patch set 3
V -106/21/23, 06:26 -
core-ci voted on patch set 3 V -1 06/21/23, 06:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42862
-
Thomas Hohn uploaded patch set 4
V -106/21/23, 06:41 -
core-ci voted on patch set 4 V +1 06/21/23, 06:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42863
-
Mathias Brodala commented on patch set 4 06/21/23, 07:16
Breaking-101133-ConverIconStateToNativeEnum.rst:31Here we should add the implied "IconState::" prefix to have this found in searches. -
Thomas Hohn uploaded patch set 5
V +106/21/23, 07:29 -
Thomas Hohn commented on patch set 4 06/21/23, 07:30
Breaking-101133-ConverIconStateToNativeEnum.rst:21ReplyWill adaptBreaking-101133-ConverIconStateToNativeEnum.rst:31ReplyHi - will adapt -
Thomas Hohn uploaded patch set 6 06/21/23, 07:34
-
Mathias Brodala commented on patch set 6 06/21/23, 07:35
Breaking-101133-ConverIconStateToNativeEnum.rst:21ReplyDoneBreaking-101133-ConverIconStateToNativeEnum.rst:31ReplyDone -
core-ci voted on patch set 5 V +1 06/21/23, 07:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42864
-
core-ci voted on patch set 6 V +1 06/21/23, 07:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42865
-
Nikita Hovratov commented on patch set 6 CR -1 06/23/23, 12:41
IconFactory.php:85Not sure about just breaking a (often useed) public method without a grace period. I would rather keep the old Enumeration class and introduce the enum (in a new namespace) in parallel. This would only require to change the typehint to `IconState|Enum\IconState $state` and then check in the code, which one was provided. We did a similar thing for AbstractMessage in v12: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74925 -
Thomas Hohn uploaded patch set 7
CR -1V +106/24/23, 09:35 -
core-ci voted on patch set 7 V -1 06/24/23, 09:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42943
-
Thomas Hohn uploaded patch set 8
V -106/24/23, 20:05 -
core-ci voted on patch set 8 V +1 06/24/23, 20:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42947
-
Thomas Hohn uploaded patch set 9
V +106/25/23, 17:41 -
Thomas Hohn commented on patch set 8 06/25/23, 17:42
IconFactory.php:85ReplyDone -
core-ci voted on patch set 9 V +1 06/25/23, 17:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42953
-
Nikita Hovratov uploaded patch set 10
V +106/27/23, 13:30 -
core-ci voted on patch set 10 V -1 06/27/23, 13:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43032
-
Nikita Hovratov uploaded patch set 11
V -106/27/23, 14:17 -
core-ci voted on patch set 11 V +1 06/27/23, 14:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43038
-
Nikita Hovratov uploaded patch set 12
V +106/27/23, 14:28 -
core-ci voted on patch set 12 V +1 06/27/23, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43039
-
Nikita Hovratov commented on patch set 12 06/27/23, 14:42
Hey Thomas, I hope it is ok that I hijacked your patch. Important changes are the addition of `trigger_error` in IconFactory->getIcon(), so the deprecation gets logged, the UnitDeprecated test, to ensure the deprecated way of calling the method still works and the change to FEATURE, as this is not only an internal change, but new public API. I won't vote for this now, as I changed too much code myself. -
Thomas Hohn commented on patch set 12 06/27/23, 20:19
Reply
Hi NP -
Benni Mack rebased onto patch set 13
V +107/06/23, 10:31 -
core-ci voted on patch set 13 V +1 07/06/23, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43691
-
Oliver Klee voted on patch set 13 V +1 07/06/23, 11:25
-
Benni Mack commented on patch set 13 CR -1 07/06/23, 14:31
Can you please move the new Enum from Classes/Type/Enum/IconState.php to Classes/Type/IconState.php ? I think "Type" makes it clear where this belongs. Otherwise we can also move it to Classes/Imaging. Will have to think about it for a bit... -
Thomas Hohn commented on patch set 13 07/06/23, 15:27
Reply
The later might give more sense - give me a ping once you've decided 😊 -
Oliver Klee commented on patch set 13 07/15/23, 13:15
Any news on this? -
Thomas Hohn commented on patch set 13 07/15/23, 15:03
Reply
Not to my knowledge ;-) -
Alexander Schnitzler commented on patch set 13 07/21/23, 13:00
Reply
I second that. I wouldn't put more enums in the Type namespace just because our pre php8.1 enum polyfill lay there. TYPO3\CMS\Core\Imaging is a good namespace for the new enum. -
Benni Mack commented on patch set 13 07/21/23, 13:32
Reply
sounds good. -
Thomas Hohn uploaded patch set 14
CR -1V +107/24/23, 09:54 -
core-ci voted on patch set 14 V +1 07/24/23, 10:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44466
-
Alexander Schnitzler commented on patch set 14 07/24/23, 17:19
IconController.php:72Just one thing to consider here. The previous enum implementation threw an exception if for invalid values. So just using try here would be closer to the former implementation. But I don't see a benefit in throwing an exception if we can gracefully fail with null here. Therefore no -1 from my side. -
Thomas Hohn commented on patch set 14 07/24/23, 17:41
IconController.php:72ReplyAck -
Oliver Klee voted on patch set 14 V +1 07/24/23, 17:50
-
Nikita Hovratov rebased onto patch set 15
V +107/25/23, 16:22 -
Nikita Hovratov voted on patch set 15 V +1 CR +1 07/25/23, 16:23
-
core-ci voted on patch set 15 V +1 07/25/23, 16:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44547
-
Oliver Klee voted on patch set 15 V +1 07/25/23, 16:48
-
Benni Mack voted on patch set 15 V +2 CR +2 07/25/23, 18:09
-
Benni Mack merged patch set 16 07/25/23, 18:09
Breaking-101133-ConverIconStateToNativeEnum.rst:21