Review main Merged

64449[TASK] Fix phpstan checkFunctionArgumentTypes errors in ext:extbase

Alexander Schnitzler CR +2 V +2 Normal +86 −140 updated 11/05/20, 19:54

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
    • Alexander Schnitzler +1
  • Verified V +2 Done
    • Benni Mack +2
    • Daniel Goerz +1
    • Alexander Schnitzler +1
    • TYPO3com +1 CI

Issues 1

Files 21

Show 1 more file

Review log 3244

Show 1319 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 05/10/20, 15:13

  2. Alexander Schnitzler wrote 05/10/20, 15:13

    Topic set to phpstan
  3. TYPO3com voted on patch set 1 V -1 05/10/20, 15:24 Completed build in 11m 16s on Sun, 10 May, 03:24 PM Test Summary: 12 of 74180 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3291

  4. Alexander Schnitzler rebased onto patch set 2 06/03/20, 17:27

  5. Alexander Schnitzler uploaded patch set 3 06/03/20, 17:37

  6. TYPO3com voted on patch set 2 V -1 06/03/20, 17:39 Completed build in 12m 17s on Wed, 3 Jun, 05:39 PM Test Summary: 12 of 73323 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3782

  7. TYPO3com voted on patch set 3 V +1 06/03/20, 17:57 Completed build in 13m 48s on Wed, 3 Jun, 05:57 PM Test Summary: 72824 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3786

  8. Alexander Schnitzler uploaded patch set 4 08/13/20, 15:09

  9. TYPO3com voted on patch set 4 V +1 08/13/20, 15:22 Completed build in 13m 12s on Thu, 13 Aug, 03:22 PM Test Summary: 72974 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4641

  10. Alexander Schnitzler uploaded patch set 5 08/26/20, 13:10

  11. Tymoteusz Motylewski commented on patch set 5 08/26/20, 13:52

    FloatValidator.php:36

    would it make sense to cast to string inside translateErrorMessage instead?
  12. Tymoteusz Motylewski commented on patch set 5 08/26/20, 13:53

    Typo3DbQueryParserTest.php:211

    why is this test being removed?
  13. Alexander Schnitzler commented on patch set 5 08/26/20, 13:59

    FloatValidator.php:36 Reply Unresolved

    Yes but that would change the api and could be breaking since code could rely on that method returning null. For now it's easier to adjust the types of variables we pass into methods.

    Typo3DbQueryParserTest.php:211 Reply

    Good question. That wasn't intended. Will push a new patch set.
  14. TYPO3com voted on patch set 5 V -1 08/26/20, 14:22 Completed build in 1h 03m 58s on Wed, 26 Aug, 02:22 PM Test Summary: 401 of 72417 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4982

  15. TYPO3com voted on patch set 5 V +1 08/27/20, 08:12 Completed build in 19h 57m 19s on Thu, 27 Aug, 08:12 AM Test Summary: 73080 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4982

  16. Oliver Klee commented on patch set 5 CR -1 08/28/20, 16:52

    -1 due to the removed test
  17. Alexander Schnitzler commented on patch set 5 08/31/20, 08:14

    Typo3DbQueryParserTest.php:211 Reply Unresolved

    Ah, sorry, I finally remembered why I removed those tests. They have been removed since we have changes in typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php. Several ConstraintInterface type checks have been removed since $constraint->getConstraint1() and $constraint->getConstraint2() always return ConstraintInterface instances.
  18. Oliver Klee voted on patch set 5 CR +1 08/31/20, 12:04

  19. Jörg Bösche voted on patch set 5 CR +1 09/01/20, 08:06

  1. Alexander Schnitzler updated the commit message in patch set 6 09/03/20, 15:51

  2. TYPO3com voted on patch set 6 V +1 09/03/20, 16:32 Completed build in 35m 03s on Thu, 3 Sep, 04:32 PM Test Summary: 73168 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5195

  3. Oliver Klee voted on patch set 6 CR +1 09/04/20, 07:49

  4. Daniel Goerz uploaded patch set 7 10/31/20, 13:33

  5. Oliver Klee commented on patch set 7 10/31/20, 13:44

    RegularExpressionValidator.php:58

    Shouldn't that be !== 0 instead of === false? That way, we'd check for whether the string starts with LLL and not whether is has LLL somewhere (potentially not at the start). And would it make sense to cast $errorMessage to a string first?
  6. TYPO3com voted on patch set 7 V +1 10/31/20, 13:46 Completed build in 12m 14s on Sat, 31 Oct, 01:46 PM Test Summary: 73545 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7051

  7. Daniel Goerz uploaded patch set 8 10/31/20, 13:52

  8. Daniel Goerz uploaded patch set 9 10/31/20, 13:56

  9. Daniel Goerz uploaded patch set 10 10/31/20, 13:56

  10. Daniel Goerz commented on patch set 10 10/31/20, 13:56

    RegularExpressionValidator.php:58 Reply

    Ack
  11. Daniel Goerz uploaded patch set 11 10/31/20, 13:58

  12. Daniel Goerz commented on patch set 10 10/31/20, 13:58

    AbstractValidator.php:157 Unresolved

    This will be handles differently in the backport to avoid breaking custom vlidators that expect this method to still return null (unlikely but possible)
  13. Daniel Goerz voted on patch set 11 V +1 CR +1 10/31/20, 13:59

  14. TYPO3com voted on patch set 8 V +1 10/31/20, 14:06 Completed build in 13m 53s on Sat, 31 Oct, 02:06 PM Test Summary: 73545 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7052

  15. TYPO3com voted on patch set 9 V +1 10/31/20, 14:11 Completed build in 15m 37s on Sat, 31 Oct, 02:11 PM Test Summary: 73544 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7053

  16. TYPO3com voted on patch set 10 V +1 10/31/20, 14:15 Completed build in 18m 51s on Sat, 31 Oct, 02:15 PM Test Summary: 73545 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7054

  17. TYPO3com voted on patch set 11 V +1 10/31/20, 14:19 Completed build in 13m 50s on Sat, 31 Oct, 02:19 PM Test Summary: 73545 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7055

  18. Oliver Klee voted on patch set 11 CR +1 10/31/20, 14:31

  19. Alexander Schnitzler commented on patch set 11 11/02/20, 06:48

    ActionController.php:434

    What do we do here? I would like to avoid the todo and make a decision now. The alternative would be: > $callable();

    LazyLoadingProxy.php:150

    Like in the ActionController, we could use the following here: > $callable(...$arguments); wdyt?

    Dispatcher.php:147 Unresolved

    Same question again here regarding the callable as before.

    RegularExpressionValidator.php:58 Unresolved

    Should we use \TYPO3\CMS\Core\Utility\StringUtility::beginsWith() here instead?
  20. Alexander Schnitzler commented on patch set 11 V +1 CR +1 11/05/20, 11:16

    Regardless my comments, I vote +1 now. Nothing that has to be changed now.
  21. Benni Mack commented on patch set 11 11/05/20, 16:07

    ActionController.php:434 Reply

    $callable() seems fine. However since "callable" is a reserved word, I'd call it $actionCallable or something like that (you never know, but I also don't like variable names like $array ;)). Otherwise I'd recommend avoiding call_user_func() as a personal preference.

    LazyLoadingProxy.php:150 Reply Unresolved

    +1
  22. Oliver Klee commented on patch set 11 11/05/20, 16:22

    ActionController.php:434 Reply

    What about the name $actionInitializer?
  23. Alexander Schnitzler commented on patch set 11 11/05/20, 19:11

    Let's merge without further changes to speed things up a little.

    ActionController.php:434 Reply Unresolved

    Ok, doesn't seem to be an easy decision and since we will backport to 10.4, I would put those changes into another patch set for 11 only.
  24. Benni Mack voted on patch set 11 V +2 CR +2 11/05/20, 19:54

  25. Benni Mack merged patch set 12 11/05/20, 19:54