Review main Merged

97353[TASK] Fix PHPStan level 8 findings in extension scanner

Simon Schaufelberger CR +2 V +2 Hard +283 −29 updated 11/08/26, 21:15

Commit message

Make EXT:install's extension scanner and its unit tests pass
PHPStan level 8 analysis:

- Add PHPDoc array shapes to the matcher data providers and to the
  test methods consuming them, which had iterable parameters
  without value types
- Assert that fixtures and inline snippets were parsed before they
  are passed to NodeTraverser::traverse(), since parse() may
  return null
- Cast the file_get_contents() result to string before parsing it,
  as the function may return false
- Skip GeneralUtility::makeInstance() calls with a dynamic method
  name in GeneratorClassesResolver, and cover that with a test

Review

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

Issues 1

Files 26

Show 6 more files

Review log 1721

  1. Simon Schaufelberger uploaded patch set 1 11/05/26, 01:14

  2. Simon Schaufelberger commented on patch set 1 11/05/26, 01:16

    The results of this Patch will be extracted into the standalone extension scanner which can be found here: https://github.com/simonschaufi/scanner/
  3. core-ci voted on patch set 1 V +1 11/05/26, 01:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113330

  4. Oliver Klee commented on patch set 1 11/05/26, 10:50

    AbstractMethodImplementationMatcherTest.php:36

    Can we make this more specific by checking for the specific type instead of for not-null? (Ditto for all other changes of the same type.)
  5. Simon Schaufelberger commented on patch set 1 11/05/26, 10:53

    AbstractMethodImplementationMatcherTest.php:36 Reply

    can you please make a suggestion what you would expect as I don't know what you mean?
  6. Oliver Klee commented on patch set 1 11/05/26, 11:11

    AbstractMethodImplementationMatcherTest.php:36 Reply

    Like this (in this case): ```suggestion self::assertIsArray($statements, 'Code could not be parsed.'); ```
  7. Simon Schaufelberger rebased onto patch set 2 V +1 11/05/26, 11:30

  8. Simon Schaufelberger commented on patch set 2 11/05/26, 11:40

    AbstractMethodImplementationMatcherTest.php:36 Reply

    Done
  9. Simon Schaufelberger uploaded patch set 3 11/05/26, 11:41

  10. Oliver Klee voted on patch set 3 CR +1 V +1 11/05/26, 11:43

  11. core-ci voted on patch set 3 V +1 11/05/26, 11:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113397

  12. Markus Klein voted on patch set 3 CR +1 V +1 11/05/26, 12:24

  13. Simon Schaufelberger uploaded patch set 4 CR +1 V +1 11/05/26, 13:18

  14. core-ci voted on patch set 4 V +1 11/05/26, 13:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113407

  15. Oliver Klee voted on patch set 4 CR +1 V +1 11/05/26, 14:15

  16. Simon Schaufelberger uploaded patch set 5 CR +1 V +1 11/05/26, 16:31

  17. core-ci voted on patch set 5 V +1 11/05/26, 16:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113416

  18. Oliver Klee voted on patch set 5 CR +1 V +1 11/05/26, 16:56

  19. Garvin Hicking voted on patch set 5 CR +2 V +2 11/05/26, 23:10

  20. Garvin Hicking merged patch set 6 11/05/26, 23:12

  21. Simon Schaufelberger commented on patch set 6 11/08/26, 21:15

    Reply

    Done