Review main Merged

94245[TASK] Extract DeserializationService from PolymorphicDeserializer

Oliver Hader CR +2 V +2 Hard +181 −95 updated 06/02/26, 21:49

Commit message

Separate concerns and make it better reusable by extracing a new
DeserializationService from PolymorphicDeserializer.

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

Review log 2024

  1. Oliver Hader uploaded patch set 1 06/01/26, 21:03

  2. 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

  3. Oliver Klee commented on patch set 1 V +1 06/01/26, 21:16

    PolymorphicDeserializer.php:60

    We should mention in which version this was deprecated and in which version it will be removed.
  4. Oliver Hader commented on patch set 1 06/02/26, 05:37

    PolymorphicDeserializer.php:60 Reply

    The 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.
  5. Oliver Klee commented on patch set 1 CR +1 06/02/26, 07:30

    PolymorphicDeserializer.php:60 Reply

    I 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.
  6. Oliver Hader commented on patch set 2 CR +1 V +1 06/02/26, 09:57

    Published edit on patch set 1.
  7. Oliver Hader commented on patch set 2 06/02/26, 09:57

    PolymorphicDeserializer.php:60 Reply

    That's fine of course. Thanks!
  8. Oliver Klee voted on patch set 2 CR +1 V +1 06/02/26, 10:01

  9. 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

  10. Stefan Bürk voted on patch set 2 CR +1 V +1 06/02/26, 12:06

  11. Christian Kuhn commented on patch set 2 06/02/26, 12:11

    DeserializationService.php:28

    nit: 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:28

    this works? i am not used to it. i personally tend to fall back ??= in body. why the fallback in the first place?

    ServiceProvider.php:159

    i don't fully understand this detail: why an extension/decoration here and not a factory?
  12. Oliver Hader commented on patch set 2 06/02/26, 12:32

    DeserializationService.php:28 Reply

    ack

    PolymorphicDeserializer.php:28 Reply

    Yes, 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:159 Reply

    I 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}
  13. Oliver Hader commented on patch set 2 06/02/26, 12:36

    ServiceProvider.php:159 Reply

    However, I'd be fine with dropping it, since we currently don't really need it in the `FailsafeContainer`
  14. Oliver Hader marked it work in progress 06/02/26, 12:41

  15. Oliver Hader uploaded patch set 3 CR +1 V +1 06/02/26, 15:40

  16. Oliver Hader commented on patch set 3 06/02/26, 15:44

    This change is ready for review.

    DeserializationService.php:28 Reply

    Done

    PolymorphicDeserializer.php:28 Reply

    Done

    ServiceProvider.php:159 Reply

    Done
  17. 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

  18. Oliver Hader uploaded patch set 4 V -1 06/02/26, 16:07

  19. 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

  20. Christian Kuhn voted on patch set 4 CR +1 V +1 06/02/26, 16:29

  21. Oliver Klee voted on patch set 4 CR +1 V +1 06/02/26, 16:48

  22. Stefan Bürk voted on patch set 4 CR +1 V +1 06/02/26, 17:17

  23. Oliver Hader voted on patch set 4 CR +2 V +2 06/02/26, 21:49

  24. Oliver Hader merged patch set 5 06/02/26, 21:49