Review main Merged

93654[TASK] Prepare ContentObjectRenderer for v15 refactoring

Christian Kuhn CR +2 V +2 Hard +402 −166 updated 05/14/26, 07:44

Commit message

This is a last structural ContentObjectRenderer patch for
TYPO3 v14. It's goal is to finish some loose ends and
prepare the class towards dedicated v15 refactoring
works: Refactoring COR has been unlocked with TSFE being
gone, we now have a last look at some state and type
related quick wins.

First, ContentObjectRenderer has been made 'request aware'
a while ago already via setRequest() and getRequest().
getRequest() now deprecates the fallback to
$GLOBALS['TYPO3_REQUEST'] to force consumers actively
setting it. This surfaces two core consumers that did not
do that by now, most importantly the 'content area' feature
from #104974. This has been reported with #109301 already.
The solution is slightly tricky due to its lazy closure
approach, but should be ok this way.

The patch also deprecates a few public properties that
are either so old school that we don't need them anymore
or can be substituted quite easily. The patch does this
carefully to not actively break v14 consumers at this
point in time. An `@internal` declared old helper method
is kept and deprecated defensivly for this reason as well,
especially since the COR construct is so old.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 15

Review log 2939

Show 814 earlier messages
  1. Christian Kuhn uploaded patch set 1 04/14/26, 08:41

  2. core-ci voted on patch set 1 V -1 04/14/26, 08:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100126

  3. Christian Kuhn uploaded patch set 2 V -1 04/14/26, 09:39

  4. core-ci voted on patch set 2 V +1 04/14/26, 09:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100128

  5. Christian Kuhn uploaded patch set 3 V +1 04/14/26, 10:31

  6. core-ci voted on patch set 3 V +1 04/14/26, 10:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100138

  7. Christian Kuhn uploaded patch set 4 V +1 04/14/26, 11:55

  8. core-ci voted on patch set 4 V +1 04/14/26, 12:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100154

  9. Christian Kuhn commented on patch set 4 04/14/26, 15:47

    mmmh. some details might be too invasive in v14, i'll relax them again. the main goal is to have some clean deprecations in v14 to have less breaking stuff in v15. the commit message will reflect that later.
  10. Christian Kuhn uploaded patch set 5 V +1 04/14/26, 17:29

  11. Christian Kuhn uploaded patch set 6 04/14/26, 17:32

  12. core-ci voted on patch set 6 V -1 04/14/26, 17:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100183

  13. Christian Kuhn uploaded patch set 7 V -1 04/14/26, 17:43

  14. core-ci voted on patch set 7 V +1 04/14/26, 17:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100185

  1. core-ci voted on patch set 5 V -1 04/14/26, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100182

  2. Nikita Hovratov commented on patch set 7 04/15/26, 08:58

    ContentObjectRenderer.php:5128

    Can be string|false and the phpdoc comment then removed
  3. Christian Kuhn commented on patch set 7 04/15/26, 09:56

    talked to Nikita: We'll set that to related, not resolves.
  4. Christian Kuhn commented on patch set 7 04/15/26, 12:59

    Reply

    Done

    ContentObjectRenderer.php:5128 Reply

    Done
  5. Christian Kuhn uploaded patch set 8 V +1 04/15/26, 12:59

  6. core-ci voted on patch set 8 V +1 04/15/26, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100251

  7. Oliver Klee commented on patch set 8 04/15/26, 13:29

    ContentObjectRenderer.php:5128 Reply

    I think Nikita was referring to the native return type: ```suggestion protected function getFromCache(array $configuration): string|false ``` Then we could drop the `@return` PHPDoc type annotation.
  8. Christian Kuhn commented on patch set 8 04/15/26, 14:15

    ContentObjectRenderer.php:5128 Reply

    i kept the 'false on cache miss' note since i think its helpful. did i miss something?
  9. Oliver Klee commented on patch set 8 04/15/26, 14:22

    ContentObjectRenderer.php:5128 Reply

    Sorry, I looked in the wrong place!
  10. Chris Müller commented on patch set 8 04/15/26, 14:42

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:76

    ```suggestion :php:`\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::convertFlexFormContentToArray()` ``` FlexFormService has been merged in FlexFormTools with #107945.

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:170

    ```suggestion Replace with :php:`FlexFormTools::convertFlexFormContentToArray()` and ```

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:180

    ```suggestion $conf = $this->flexFormTools->convertFlexFormContentToArray($flexFormXml); ```
  11. Christian Kuhn commented on patch set 8 04/15/26, 23:27

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:76 Reply

    Fix applied. Thank you!

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:170 Reply

    Fix applied.

    Deprecation-109575-ContentObjectRendererPropertiesAndMethods.rst:180 Reply

    Fix applied.
  12. Christian Kuhn commented on patch set 9 V +1 04/15/26, 23:27

    Published edit on patch set 8.
  13. core-ci voted on patch set 9 V +1 04/15/26, 23:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100275

  14. Nikita Hovratov voted on patch set 9 CR +1 04/16/26, 07:44

  15. Christian Kuhn commented on patch set 9 CR -1 04/16/26, 10:28

    ContentObjectRenderer.php:299

    got feedback regarding this one: parentRecord can be pretty useful in sub content elements to act depending on it's parent. example: insert records element. parentrecord is similar to some other properties i did not deprecate since they carry important side,sub and in this case parent context. this is one of the areas that will have to see a better solution later. we'll keep parentRecord for now.
  16. Christian Kuhn uploaded patch set 10 CR +1 V +1 04/16/26, 11:02

  17. Christian Kuhn commented on patch set 10 04/16/26, 11:02

    ContentObjectRenderer.php:299 Reply

    Done
  18. core-ci voted on patch set 10 V +1 04/16/26, 11:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100307

  19. Stefan Bürk voted on patch set 10 CR +1 V +1 04/16/26, 11:26

  20. Nikita Hovratov voted on patch set 10 CR +1 04/16/26, 11:30

  21. Anja Leichsenring voted on patch set 10 CR +1 V +1 04/16/26, 16:41

  22. Christian Kuhn voted on patch set 10 CR +2 V +2 04/17/26, 13:04

  23. Christian Kuhn merged patch set 11 04/17/26, 13:04

  24. Lina Wolf commented on patch set 11 05/14/26, 07:40

    Does it mean that the TypoScript gettext property [cObj](https://docs.typo3.org/permalink/t3tsref:data-type-gettext-cobj) is now deprecated?
  25. Lina Wolf commented on patch set 11 05/14/26, 07:44

    Reply

    Sorry, found it mentioned in the changelog entry below