Review main Abandoned

76671[WIP][TASK] Make the Extbase controller classes strict

Oliver Klee CR 0 V 0 Hard +325 −347 updated 08/25/24, 10:10

Commit message

Also add native type declarations.

Also adapt subclasses as needed.

TODO: RST as this is breaking
TODO: Check PHPStan
TODO: Check tests
TODO: Drop unused imports
TODO: Split up into multiple changes, some backportable

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 20

Review log 1216

  1. Oliver Klee uploaded patch set 1 11/18/22, 09:29

  2. core-ci voted on patch set 1 V -1 11/18/22, 09:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33906

  3. Georg Ringer commented on patch set 1 CR -1 11/18/22, 12:38

    don't make it breaking, just to be a bit more strict (which is nice in general but doesn't add any other value to devs)

    ActionController.php:250

    changing that is breaking and not allowed and especially very hard for extension devs to support multiple major typo3 versions
  4. Oliver Klee commented on patch set 1 11/18/22, 13:10

    ActionController.php:250 Reply

    Adding return types indeed is breaking. However, supporting multiple TYPO3 versions in extensions still is possible as you can add the return type in the subclass even if the method in the superclass does not have it.
  5. Oliver Klee uploaded patch set 2 11/19/22, 09:35

  6. Oliver Klee marked it work in progress 11/19/22, 09:36

  7. core-ci voted on patch set 2 V -1 11/19/22, 09:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33943

  8. Christian Kuhn commented on patch set 2 11/19/22, 10:59

    ActionController.php:250 Reply

    Well, we could have added the return type in for 12.0, but not for 12.1 anymore. The thing is, ActionController is *the* abstract controllers extend from, and initializeAction() is a classic method that is overwritten. Extensions that were just made ready for 12.0 would break with 12.1 again if we add the return type now. I guess that's what Georg wanted to say here. Since this abstract is extended so often (we may be a bit more relaxed on this with classes that are far less often extended), we should indeed not add the return type in v12 anymore to avoid being breaking for those extensions that were just made v12 compatible - a habit we try to boost strategically.
  9. Oliver Klee commented on patch set 2 11/19/22, 12:08

    ActionController.php:250 Reply

    Okay, then I'll move this (and the ticket) to V13 and do the non-breaking changes in separate tickets/changes. Thanks for the input, you two!
  10. Oliver Klee uploaded patch set 3 V -1 03/11/23, 18:24

  11. core-ci voted on patch set 3 V -1 03/11/23, 19:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38808

  12. Oliver Klee uploaded patch set 4 V -1 03/27/23, 11:37

  13. Oliver Klee wrote 03/29/23, 11:42

    Topic set to extbase
  14. Oliver Klee uploaded patch set 5 11/25/23, 13:37

  15. core-ci voted on patch set 5 V -1 11/25/23, 13:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49922

  16. Oliver Klee abandoned the change 08/25/24, 10:10