Review main Merged

65655[TASK] Fix phpstan checkFunctionArgumentTypes errors in ext:core Domain

Sascha Egerer CR +2 V +2 Easy +2 −2 updated 09/11/20, 09:43

Commit message

This patch fixes incompatible type usage in function arguments
and is preparatory work for introducing native type hints and
strict mode in all core files.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Daniel Goerz +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • Daniel Goerz +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1315

  1. Sascha Egerer uploaded patch set 1 09/09/20, 17:15

  2. Sascha Egerer wrote 09/09/20, 17:24

    Topic set to phpstan
  3. Sascha Egerer updated the commit message in patch set 2 09/09/20, 17:24

  4. TYPO3com voted on patch set 1 V +1 09/09/20, 17:31 Completed build in 16m 35s on Wed, 9 Sep, 05:31 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5420

  5. Daniel Goerz voted on patch set 2 V +1 CR +1 09/09/20, 18:13

  6. Oliver Klee voted on patch set 2 CR +1 09/09/20, 18:32

  7. Sascha Egerer voted on patch set 2 V +1 CR +1 09/10/20, 06:50

  8. Jörg Bösche commented on patch set 2 CR -1 09/10/20, 07:44

    PageRepository.php:196

    The second argument of enableFields can be 0,1 and -1 . Do we never have to consider the value "-1" at this point? The $show_hidden variable is passed to the init() method as an argument and in this line the var is passed as argument to the enableFields(). I'm really unsure whether we will get true / false or whether the value -1 will also take into account.
  9. Daniel Goerz updated the commit message in patch set 3 09/10/20, 08:46

  10. TYPO3com voted on patch set 3 V +1 09/10/20, 09:45 Completed build in 45m 28s on Thu, 10 Sep, 09:45 AM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5472

  11. Daniel Goerz commented on patch set 3 09/10/20, 17:18

    PageRepository.php:196 Reply Unresolved

    Hi Jörg, this is not a problem for several reasons. 1. this protected and internal method is only called from the constructor where there is always a boolean passed as $show_hidden, so no -1 possible. The boolean is fetched from the VisibilityAspect. 2. Passing -1 to enableFields is unintended. It rather is the default value for the case that no 1 or 0 is passed. That case will trigger the enableFields method to look in the VisibilityAspect instead. So we get the same result. Casting the boolean to int is fine here.
  12. Daniel Goerz voted on patch set 3 V +1 CR +1 09/10/20, 17:19

  13. Oliver Klee voted on patch set 3 CR +1 09/10/20, 19:16

  14. Benni Mack voted on patch set 3 V +2 CR +2 09/11/20, 09:43

  15. Benni Mack merged patch set 4 09/11/20, 09:43