Review main Merged

92794[TASK] Remove redundant type checks proven safe by native PHP types

Benni Mack CR +2 V +2 Hard +40 −218 updated 02/11/26, 15:29

Commit message

This change removes type-checking code that is guaranteed
to be redundant by PHP's native types:

- is_array()
- is_string()
- is_object()
- is_callable()
- instanceof checks

on natively-typed parameters, return values and properties.

At the same time this change simplifies conditions after
null-coalescing assignments (??=) and fixes the return type of
BlowfishPasswordHash::getCountLog2().

Review

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

Issues 1

Files 22

Show 2 more files

Review log 1013

  1. Benni Mack uploaded patch set 1 02/11/26, 14:00

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

  3. Benni Mack uploaded patch set 2 V -1 02/11/26, 14:47

  4. Benni Mack marked it ready for review 02/11/26, 14:47

  5. Oliver Klee commented on patch set 2 V +1 02/11/26, 14:53

    BlowfishPasswordHash.php:172

    ```suggestion * @return int|null Used hashcount for given hash string ```
  6. Benni Mack commented on patch set 3 V +1 02/11/26, 14:54

    Published edit on patch set 2.
  7. Benni Mack commented on patch set 3 02/11/26, 14:55

    BlowfishPasswordHash.php:172 Reply

    Done
  8. core-ci voted on patch set 2 V +1 02/11/26, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95627

  9. Oliver Klee voted on patch set 3 CR +1 V +1 02/11/26, 14:56

  10. core-ci voted on patch set 3 V +1 02/11/26, 15:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95629

  11. Anja Leichsenring voted on patch set 3 CR +1 V +1 02/11/26, 15:04

  12. Benni Mack voted on patch set 3 CR +2 V +2 02/11/26, 15:29

  13. Benni Mack merged patch set 4 02/11/26, 15:29