Review 14.3 Merged

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

Garvin Hicking CR +2 V +2 Hard +284 −29 updated 11/09/26, 13:44

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
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 1

Files 26

Show 6 more files

Review log 913

  1. Garvin Hicking commented on patch set 1 11/05/26, 23:10

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/PropertyExistsStaticMatcherTest.php
  2. core-ci voted on patch set 1 V -1 11/05/26, 23:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113425

  3. Simon Schaufelberger uploaded patch set 2 V -1 11/06/26, 00:00

  4. core-ci voted on patch set 2 V +1 11/06/26, 00:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113426

  5. Simon Schaufelberger uploaded patch set 3 V +1 11/06/26, 00:16

  6. core-ci voted on patch set 3 V +1 11/06/26, 00:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113428

  7. Garvin Hicking commented on patch set 3 CR +1 V +1 11/09/26, 12:55

    This change is ready for review.
    Generally this is fine by me, I asked @bo@cedev.de though why the test that is now removed was initially merged, and if there was a need for that which I might not be seeing now. Waiting for feedback before merge.
  8. Garvin Hicking commented on patch set 3 11/09/26, 12:55

    Reply

    (This is about `dynamicClassConstantFetchIsIgnored` in `typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ClassConstantMatcherTest.php`)
  9. Garvin Hicking commented on patch set 3 V 0 CR -1 11/09/26, 13:21

    Received Olis feedback, will relay.
  10. Simon Schaufelberger uploaded patch set 4 CR -1 V +1 11/09/26, 13:34

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

  12. Garvin Hicking voted on patch set 4 CR +2 V +2 11/09/26, 13:44

  13. Garvin Hicking merged patch set 5 11/09/26, 13:44