Review main Abandoned

71237[BUGFIX] Avoid PHP8 TypeErrors

TYPO3com CR 0 V 0 Normal +75 −87 updated 11/11/21, 20:42

Commit message

Version from 9/24/2021, when troubleshooting under PHP 8 and active
debugging, various error messages appear in the, which make
troubleshooting in your own extension impossible. I made various
adjustments and tested them under PHP7 and PHP.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 1216

  1. TYPO3com uploaded patch set 1 09/24/21, 18:41

  2. core-ci voted on patch set 1 V -1 09/24/21, 18:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17172

  3. crell commented on patch set 1 09/24/21, 19:57

    There's a whole bunch of places where you're removing null checks. I don't understand why. We added those to avoid errors.

    PageRenderer.php:2211 Unresolved

    I can never remember what the operation binding priority is between ?? and ?, which means these should probably have parens to avoid confusion. (I don't know off hand if they'd work without or not, which is the problem.)

    AbstractMenuContentObject.php:263 Unresolved

    IMO this is fine to keep on a single line. The $id temp var doesn't add value here. The ?? is sufficient.

    RequestHandler.php:74 Unresolved

    Why? Typed properties are always superior to docblock types, except for extbase records (since extbase doesn't know about typed properties).

    RequestHandler.php:432 Unresolved

    Please don't remove the note to remove this later. Otherwise it will never get removed. :-) Also, why remove the null check here?

    RequestHandler.php:436 Unresolved

    Ibid.

    RequestHandler.php:437 Unresolved

    This also seems like it's going the wrong direction.

    RequestHandler.php:441 Unresolved

    Invasive tabs.

    RequestHandler.php:475 Unresolved

    Ibid.

    RequestHandler.php:479 Unresolved

    Ibid.

    RequestHandler.php:480 Unresolved

    Ibid.

    RequestHandler.php:543 Unresolved

    Invasive tabs.

    RequestHandler.php:569 Unresolved

    Invasive tabs.

    RequestHandler.php:576

    I have a hard time following this logic. external or false, and then if that's true, return false, otherwise check disableCompression? That doesn't seem like what the previous line was doing.

    RequestHandler.php:585 Unresolved

    Invasive tabs.

    RequestHandler.php:598 Unresolved

    Backwards?

    RequestHandler.php:612 Unresolved

    Also backwards?

    RequestHandler.php:626 Unresolved

    Also backwards?

    RequestHandler.php:653 Unresolved

    Also backwards?
  4. Oliver Klee commented on patch set 1 09/24/21, 20:10

    Unresolved

    Methinks there's a word missing after the "the".
  5. Benni Mack commented on patch set 1 CR -1 10/08/21, 08:18

    FileOrFolderLinkBuilder.php:34 Unresolved

    so how would that work? "false ?: ..."
  6. Robert Kärner commented on patch set 1 CR -1 10/08/21, 20:50

    RequestHandler.php:576 Reply

    It was me who simplified this line (and the even more complicated one at line 444) in https://review.typo3.org/c/Packages/TYPO3.CMS/+/70867 It seems that this patchset is based on an older version and needs a rebase (and some rework). See my comments in the linked patch for information on how I simplified this.
  7. Robert Kärner commented on patch set 1 10/08/21, 20:54

    RequestHandler.php:576 Reply Unresolved

    Well, now that I think more about it, the patch was rebased at some point, but the work was done on the previous state.
  8. Benni Mack uploaded patch set 2 10/26/21, 08:20

  9. core-ci voted on patch set 2 V -1 10/26/21, 08:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18564

  10. Guido Schmechel commented on patch set 2 10/27/21, 15:21

    DebugUtility.php:162 Unresolved

    Isn't that a change in logic? Wouldn't that be two array entries instead of one? Or do I understand something wrong?
  11. Christian Kuhn commented on patch set 2 11/09/21, 20:24

    ping. could we either pick this one up, rebase and see what is left or abandon the change, and/or split this into better digestible chunks?
  12. Christian Kuhn commented on patch set 2 11/09/21, 20:24

    maybe a couple of tests here and there to nail some of the problems by testing?
  13. Stefan Bürk commented on patch set 2 11/10/21, 17:39

    ExtendedTemplateService.php:1190 Unresolved

    ExtendedTemplateService.php:1250 Unresolved

  14. Benni Mack uploaded patch set 3 11/11/21, 11:17

  15. core-ci voted on patch set 3 V -1 11/11/21, 11:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19170

  16. Benni Mack abandoned the change 11/11/21, 20:42

    abandoning this change now. There are a lot of remarks and the initial author did not pick this up. Fixing the patchset will take more time now than actually solving it separately in smaller chunks.