94245[TASK] Extract DeserializationService from PolymorphicDeserializer
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Oliver Klee +1
- Stefan Bürk +1
- Christian Kuhn +1
-
Verified V +2 Done
- Oliver Hader +2
- Oliver Klee +1
- Stefan Bürk +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Package/Cache/PackageCacheEntry.php+6 −6
- typo3/sysext/core/Classes/Serializer/Exception/DeserializerException.phprenamed+2 −2
- typo3/sysext/core/Classes/Serializer/DeserializationService.php3new+100 −0
- typo3/sysext/core/Classes/Serializer/PolymorphicDeserializer.php7+14 −57
- typo3/sysext/core/Tests/Functional/Serializer/DeserializationServiceTest.phpnew+57 −0
- typo3/sysext/core/Tests/Functional/Serializer/PolymorphicDeserializerTest.php+2 −30
Review log 2024
-
Oliver Hader uploaded patch set 1 06/01/26, 21:03
-
core-ci voted on patch set 1 V +1 06/01/26, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102779
-
Oliver Klee commented on patch set 1 V +1 06/01/26, 21:16
-
Oliver Hader commented on patch set 1 06/02/26, 05:37
PolymorphicDeserializer.php:60ReplyThe class has been introduced as `@internal` in January 2026 with a security fix for all versions. Thus, the method could be dropped directly already. Anyway, deprecating (with RST) or removing directly would be separate task for v15 then. -
Oliver Klee commented on patch set 1 CR +1 06/02/26, 07:30
PolymorphicDeserializer.php:60ReplyI was thinking about something along these lines: ```suggestion * @deprecated use DeserializationService::parseClassNames instead; will be removed in V15 ``` This would make the work of finding things to remove later a bit easier. -
Oliver Hader commented on patch set 2
CR +1V +106/02/26, 09:57Published edit on patch set 1. -
Oliver Hader commented on patch set 2 06/02/26, 09:57
PolymorphicDeserializer.php:60ReplyThat's fine of course. Thanks! -
Oliver Klee voted on patch set 2 CR +1 V +1 06/02/26, 10:01
-
core-ci voted on patch set 2 V +1 06/02/26, 10:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102821
-
Stefan Bürk voted on patch set 2 CR +1 V +1 06/02/26, 12:06
-
Christian Kuhn commented on patch set 2 06/02/26, 12:11
DeserializationService.php:28nit: strictly speaking, this is not needed since the class has no __construct() and thus requires no DI anyway, and there are cases where it is created using new(). good to fix only if another push is needed.PolymorphicDeserializer.php:28this works? i am not used to it. i personally tend to fall back ??= in body. why the fallback in the first place?ServiceProvider.php:159i don't fully understand this detail: why an extension/decoration here and not a factory? -
Oliver Hader commented on patch set 2 06/02/26, 12:32
DeserializationService.php:28ReplyackPolymorphicDeserializer.php:28ReplyYes, see https://www.php.net/manual/en/functions.arguments.php > Example #5 Using objects as default values (as of PHP 8.1.0)ServiceProvider.php:159ReplyI played around using it in install tool controllers and got the following without having the fallbacks configured: > Tue, 02 Jun 2026 14:30:10 +0200 [CRITICAL] request="4502c5fbdd402" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): TYPO3\CMS\Core\DependencyInjection\NotFoundException, code #1519978105, file /Users/olly/Development/typo3/main/typo3/sysext/core/Classes/DependencyInjection/FailsafeContainer.php, line 100: Container entry "TYPO3\CMS\Core\Serializer\PolymorphicDeserializer" is not available. - {"mode":"WEB","application_mode":"BE","exception_class":"TYPO3\\CMS\\Core\\DependencyInjection\\NotFoundException","exception_code":1519978105,"file":"/Users/olly/Development/typo3/main/typo3/sysext/core/Classes/DependencyInjection/FailsafeContainer.php","line":100,"message":"Container entry \"TYPO3\\CMS\\Core\\Serializer\\PolymorphicDeserializer\" is not available.","request_url":"https://ip15.anyhost.it/?__typo3_install=&install%5Bcontroller%5D=maintenance&install%5Bcontext%5D=backend&install%5Btheme%5D=auto&install%5Baction%5D=cards","exception":null} -
Oliver Hader commented on patch set 2 06/02/26, 12:36
ServiceProvider.php:159ReplyHowever, I'd be fine with dropping it, since we currently don't really need it in the `FailsafeContainer` -
Oliver Hader marked it work in progress 06/02/26, 12:41
-
Oliver Hader uploaded patch set 3
CR +1V +106/02/26, 15:40 -
Oliver Hader commented on patch set 3 06/02/26, 15:44
This change is ready for review.DeserializationService.php:28ReplyDonePolymorphicDeserializer.php:28ReplyDoneServiceProvider.php:159ReplyDone -
core-ci voted on patch set 3 V -1 06/02/26, 15:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102834
-
Oliver Hader uploaded patch set 4
V -106/02/26, 16:07 -
core-ci voted on patch set 4 V +1 06/02/26, 16:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102837
-
Christian Kuhn voted on patch set 4 CR +1 V +1 06/02/26, 16:29
-
Oliver Klee voted on patch set 4 CR +1 V +1 06/02/26, 16:48
-
Stefan Bürk voted on patch set 4 CR +1 V +1 06/02/26, 17:17
-
Oliver Hader voted on patch set 4 CR +2 V +2 06/02/26, 21:49
-
Oliver Hader merged patch set 5 06/02/26, 21:49
PolymorphicDeserializer.php:60