Review main Merged Breaking

72469[!!!][TASK] Remove extbase ObjectManager

Christian Kuhn CR +2 V +2 Nightmare +161 −4009 updated 12/06/21, 14:53

Commit message

Remove main ObjectManager and Container classes plus
the v11 compatibility layers in various places.

composer rem doctrine/instantiator
composer rem doctrine/instantiator -d typo3/sysext/core --no-update

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 7

Files 115

Show 95 more files

Review log 1825

  1. Christian Kuhn uploaded patch set 1 12/02/21, 18:19

  2. Christian Kuhn uploaded patch set 2 12/02/21, 18:24

  3. core-ci voted on patch set 1 V -1 12/02/21, 18:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20431

  4. core-ci voted on patch set 2 V -1 12/02/21, 18:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20432

  5. Christian Kuhn uploaded patch set 3 12/02/21, 18:54

  6. core-ci voted on patch set 3 V -1 12/02/21, 19:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20433

  7. Christian Kuhn uploaded patch set 4 12/02/21, 19:11

  8. Christian Kuhn uploaded patch set 5 12/02/21, 19:13

  9. core-ci voted on patch set 4 V -1 12/02/21, 19:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20434

  10. core-ci voted on patch set 5 V +1 12/02/21, 19:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20435

  11. Christian Kuhn uploaded patch set 6 12/02/21, 19:33

  12. Christian Kuhn uploaded patch set 7 12/02/21, 19:37

  13. core-ci voted on patch set 6 V +1 12/02/21, 19:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20437

  14. core-ci voted on patch set 7 V +1 12/02/21, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20438

  15. Stefan Bürk voted on patch set 7 V +1 CR +1 12/02/21, 21:22

  16. Oli Bartsch commented on patch set 7 12/02/21, 21:30

    Dispatcher.php:132

    Why do we remove this check? Now this might lead to an unhandled exception.
  17. Christian Kuhn commented on patch set 7 12/02/21, 23:19

    Dispatcher.php:132 Reply

    Yes. By design: If your Services.yaml file does not provide it, you get a deprecation not in v11 due to the OM fallback. In v12 it fails hard. There are similar things in other places, and it's exactly how it should be. Did I miss something?
  18. Christian Kuhn commented on patch set 7 12/02/21, 23:21

    Dispatcher.php:132 Reply

    We *could* throw some dedicated exception "please configure appropriate Services.yaml", but there is little point in doing so since the exception is relatively clear alreaody, and we're not doing similar things at many other places, either.
  19. Alexander Schnitzler commented on patch set 7 12/03/21, 08:12

    Container.php:272

    What is the alternative to this method and getImplementationClassName()?
  20. Christian Kuhn commented on patch set 7 12/03/21, 10:41

    Container.php:272 Reply

    symfony DI / xclass
  21. Benni Mack commented on patch set 7 V +1 CR +1 12/03/21, 12:15

    Container.php:272 Reply

    I also agree "getImplementationClassName()" is actually a ugly and hackish "DI" concept, where e.g. "Interface" is removed automatically etc. This is already solved with `"alias" in Services.yaml.
  22. Benni Mack voted on patch set 7 V +2 CR +2 12/03/21, 14:02

  23. Benni Mack merged patch set 8 12/03/21, 14:02

  24. Alexander Schnitzler commented on patch set 8 12/06/21, 07:52

    Container.php:272 Reply

    I agree it was hackish before. The question is: Do we want to tell users to use a DI alias. As models aren't services but prototypes we wouldn't want extbase to ask the container here but just rely on the XClass mechanics of makeInstance() I suppose. What I am simply missing is what we are going to tell users that extend other extensions. Do we have a solution? Do we recommend extensions like extender? Do we want to come up with something new? I see the whole test suite that checks override logic has been deleted as well. I see it makes sense in the regard that we drop the whole functionality but I am not sure yet if that is a good idea.
  25. Christian Kuhn commented on patch set 8 12/06/21, 14:53

    Container.php:272 Reply

    xclass'ing is basically a drop-in replacement here: It carries the same drawbacks as registerImplementation() and in the end does the same - a different class in used. Regarding extender: We had the discussion a couple of years ago and were about to add something like that. In retrospective, I'm honestly very thankful we didn't add 'mixin' functionality to the core. The couple of extensions like maybe ext:news can decide to use that on their own and then have to manage all the problematic side effects.