Review main Merged

96157[BUGFIX] Fix scanner crash on first-class callables

Georg Tiefenbrunn CR +2 V +2 Easy +9 −1 updated 09/30/26, 09:42

Commit message

AbstractCoreMatcher::isArgumentUnpackingUsed() reads $arg->unpack on
every argument of a call. For a first-class callable such as
Foo::bar(...) the only argument is a VariadicPlaceholder, which has no
such property. The resulting warning becomes an exception under the
default SYS/exceptionalErrors, and the scan of the file fails.

The static matchers call the method for every static call, so any
static first-class callable in an extension breaks the scan of its
file. The other matchers are affected when the method name matches a
rule.

A first-class callable has no arguments to count, so it is now treated
like argument unpacking. For MethodArgumentRequiredStaticMatcher this
also avoids reporting the placeholder as a call with too few arguments.

Review

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

Issues 1

Files 3

Review log 45

  1. Georg Tiefenbrunn uploaded patch set 1 09/29/26, 07:59

  2. core-ci voted on patch set 1 V +1 09/29/26, 08:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109490

  3. Oliver Klee voted on patch set 1 CR +1 V +1 09/29/26, 09:08

  4. Benni Mack voted on patch set 1 CR +2 V +2 09/30/26, 09:42

  5. Benni Mack merged patch set 2 09/30/26, 09:42