Review main Merged

70721[TASK] Deprecate ContentObjectRenderer constructor in StandaloneView

Christian Kuhn CR +2 V +2 Normal +72 −9 updated 08/26/21, 09:36

Commit message

Handling ContentObjectRenderer instances is messy, especially
within extbase: The ConfigurationManager is a stateful singleton
since it depends on current ContentObjectRenderer being set
within frontend. The extbase Bootstrap takes care of setting the
current cObj.

ConfigurationManager is also misused (ext:form) to "park" the
current cObj for later retrieval. This needs to be tackled with
a dedicated patch.

This is worse with fluid StandaloneView, which accepts cObj as
constructor argument to update ConfigurationManager state.
Funnily, this optional constructor argument is never hand
over in core. Additionally, extbase usually does not use
StandaloneView, but fluid's TemplateView instead.

The patch deprecates the constructor argument of fluid
StandaloneView to avoid a dependency from StandaloneView
to extbase.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 1217

  1. Christian Kuhn uploaded patch set 1 08/22/21, 15:11

  2. core-ci voted on patch set 1 V -1 08/22/21, 15:14 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15391

  3. Christian Kuhn uploaded patch set 2 08/22/21, 15:26

  4. core-ci voted on patch set 2 V -1 08/22/21, 15:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15392

  5. Christian Kuhn uploaded patch set 3 08/22/21, 16:09

  6. core-ci voted on patch set 3 V -1 08/22/21, 16:27 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15396

  7. Christian Kuhn uploaded patch set 4 08/22/21, 17:17

  8. core-ci voted on patch set 4 V +1 08/22/21, 17:36 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15398

  9. Benni Mack commented on patch set 4 08/23/21, 11:39

    Deprecation-94959-ContentObjectRendererConstructorInStandaloneView.rst:53

    this migration unfortunately does not work for most of my Extbase extensions. $this->configurationManager->getContentObject()->data contains the current record (= current tt_content record when using a plugin, thus, I am able to fetch various additional fields in Extbase, which are NOT in a flexform prefixed with "settings:" :D ). $TSFE->cObj->data however contains the current page record data information.
  10. Christian Kuhn commented on patch set 4 CR -1 08/23/21, 12:54

    will change some details.
  11. Christian Kuhn uploaded patch set 5 08/26/21, 06:08

  12. Christian Kuhn commented on patch set 5 08/26/21, 06:11

    Deprecation-94959-ContentObjectRendererConstructorInStandaloneView.rst:53 Reply

    Good point. I dropped the deprecation of set/getContentObjectRenderer() from ConfigurationManager from this patch for now. We'll figure something out with a dedicated patch.
  13. core-ci voted on patch set 5 V +1 08/26/21, 06:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15648

  14. Jochen Roth voted on patch set 5 V +1 CR +1 08/26/21, 09:21

  15. Oli Bartsch voted on patch set 5 V +1 CR +1 08/26/21, 09:34

  16. Christian Kuhn voted on patch set 5 V +2 CR +2 08/26/21, 09:35

  17. Christian Kuhn merged patch set 6 08/26/21, 09:36