Review main Merged

74338[TASK] Drop pointless checks in GridDataService

Oliver Klee CR +2 V +2 Normal +54 −67 updated 04/05/23, 15:10

Commit message

This change fixes most of the remaining PHPStan warnings
in this class.

Review

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

Issues 1

Files 2

Review log 2837

Show 812 earlier messages
  1. Oliver Klee uploaded patch set 1 04/17/22, 18:58

  2. Oliver Klee uploaded patch set 2 04/17/22, 19:02

  3. core-ci voted on patch set 1 V -1 04/17/22, 19:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26112

  4. core-ci voted on patch set 2 V +1 04/17/22, 19:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26113

  5. Oliver Klee uploaded patch set 3 04/17/22, 19:28

  6. Susi Moog voted on patch set 3 CR +1 04/17/22, 19:48

  7. Stefan Bürk commented on patch set 3 CR -1 04/17/22, 19:56

    GridDataService.php:119

    We should not start spread phpstan ignore lines through the core code. This is not a solution. Having phpstan baseline file empty is a nice approach, but should not be solved by using ignores. If not solvable, leave it in the phpstan file. So we have a single place to look these issues up. We have these ignores for some testing fixtures, where broken code is explicitly tested (or ignored at all with proper comment in the config file). Leave it in the baseline file until this can solved properly.

    GridDataService.php:451

    Would suggest to use !== 0 here. This would fullfill $path_cmp < 0 and $path_cmp > 0 as early return. And make the else branch below completly superflous.
  8. Oliver Klee commented on patch set 3 04/17/22, 20:04

    GridDataService.php:451 Reply

    Ack
  9. core-ci voted on patch set 3 V -1 04/17/22, 20:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26115

  10. core-ci voted on patch set 3 V +1 04/17/22, 20:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26115

  11. Oliver Klee commented on patch set 3 04/18/22, 09:44

    GridDataService.php:119 Reply

    Done

    GridDataService.php:451 Reply

    Done.
  12. Oliver Klee uploaded patch set 4 04/18/22, 09:44

  1. core-ci voted on patch set 4 V +1 04/18/22, 09:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26136

  2. Stefan Bürk voted on patch set 4 V +1 CR +1 04/18/22, 16:09

  3. Oli Bartsch commented on patch set 4 04/19/22, 09:48

    GridDataService.php:427

    Why is this part removed? Since $dataArray is not a typed property, is_array($this->dataArray) might still be FALSE.
  4. Stefan Bürk wrote 04/19/22, 09:57

    Removed Code-Review+1 by Stefan Bürk
  5. Stefan Bürk wrote 04/19/22, 09:57

    Removed Verified+1 by Stefan Bürk
  6. Oliver Klee commented on patch set 4 04/19/22, 10:29

    GridDataService.php:427 Reply

    It's initialized as an array and (in Core code) always written with an array (i.e., either with the results of PHP functions returning an array, or methods annotated or typed as returning an array). Speaking of it, I should remove this condition here altogether, and switch the check in getDataArrayFromCache from !== false to is_array. Hold on …
  7. Oliver Klee uploaded patch set 5 04/19/22, 10:32

  8. Oliver Klee commented on patch set 5 04/19/22, 10:32

    GridDataService.php:427 Reply

    Done
  9. core-ci voted on patch set 5 V +1 04/19/22, 10:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26180

  10. Oliver Klee marked it work in progress 04/27/22, 21:24

  11. Oliver Klee uploaded patch set 6 V +1 03/11/23, 17:55

  12. core-ci voted on patch set 6 V -1 03/11/23, 19:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38803

  13. Oliver Klee uploaded patch set 7 V -1 04/05/23, 12:00

  14. Oliver Klee marked it ready for review 04/05/23, 12:00

  15. Oliver Klee wrote 04/05/23, 12:01

    Topic set to phpstan
  16. core-ci voted on patch set 7 V +1 04/05/23, 12:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40181

  17. Christian Kuhn commented on patch set 7 04/05/23, 13:44

    i'd opt to remove v11 from the backports: this is not crucial and we really shouldn't risk introducing a v11 regression in this area.
  18. Oliver Klee updated the commit message in patch set 8 V +1 04/05/23, 13:49

  19. Oliver Klee commented on patch set 8 04/05/23, 13:49

    Reply

    Makes sense, thanks for bringing this up! Done.
  20. core-ci voted on patch set 8 V +1 04/05/23, 13:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40186

  21. Benni Mack commented on patch set 8 04/05/23, 14:04

    GridDataService.php:424

    gotta love this logging message :)
  22. Christian Kuhn voted on patch set 8 V +1 CR +1 04/05/23, 14:12

  23. Oliver Klee commented on patch set 8 04/05/23, 14:42

    GridDataService.php:424 Reply

    :-D
  24. Benni Mack voted on patch set 8 V +2 CR +2 04/05/23, 15:10

  25. Benni Mack merged patch set 9 04/05/23, 15:10