Review 11.5 Merged

77956[BUGFIX] Fix PHP 8 warning in TypoLinkCodecService

Benni Mack CR +2 V +2 Easy +4 −4 updated 03/14/23, 09:35

Commit message

Added string cast before trimming $typoLink. Changed annotation
to be string|null. With TYPO3 v13 string should be added to the
methods signature and cast removed.
In addition fixed some potential calls that could have sent null
to the method, prophylactically.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 911

  1. Benni Mack commented on patch set 1 02/24/23, 15:41

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php * typo3/sysext/frontend/Classes/Typolink/LinkFactory.php
  2. core-ci voted on patch set 1 V -1 02/24/23, 16:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38064

  3. Benni Mack uploaded patch set 2 V -1 03/13/23, 22:39

  4. Benni Mack marked it ready for review 03/13/23, 22:40

  5. core-ci voted on patch set 2 V +1 03/13/23, 22:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38893

  6. Oliver Klee commented on patch set 2 03/13/23, 23:01

    TypoLinkCodecService.php:75

    Should we then have a `@todo` for adding the native `string` type declaration for the parameter so we won’t forget it in V13?
  7. Thomas Hohn commented on patch set 2 03/14/23, 05:39

    TypoLinkCodecService.php:75 Reply

    I believe there is a todo on the main branch @todo Remove the |null and make the signature strict typed in v13 as string
  8. Benni Mack commented on patch set 2 03/14/23, 06:54

    TypoLinkCodecService.php:75 Reply

    The todo is really irrelevant for v11 branch, as we only search for todos in main branch.
  9. Benni Mack voted on patch set 2 V +2 CR +2 03/14/23, 06:55

  10. Benni Mack merged patch set 3 03/14/23, 06:55

  11. Oliver Klee commented on patch set 3 CR +1 03/14/23, 09:35

    TypoLinkCodecService.php:75 Reply

    Oh, I totally missed that this was the 11.5 change when I wrote this comment. Thanks for pointing this out!