Review 14.3 Merged

94497[BUGFIX] Fix Extension Scanner crash on dynamic method calls

Garvin Hicking CR +2 V +2 Hard +305 −9 updated 06/11/26, 17:06

Commit message

Several matchers in the Extension Scanner crash when encountering
dynamic method calls like `$object->$methodName()`. This happens
because the code assumes `$node->name` is always an identifier with
a 'name' property, but for dynamic calls it can be a variable.

This is fixed by adding an explicit type check using
an `instanceof` check before accessing `$node->name->name`.
This follows the pattern already used correctly
in `MethodArgumentUnusedMatcher`.

Added tests fixate this behavior.

Affected matchers:
- MethodArgumentDroppedMatcher
- MethodArgumentDroppedStaticMatcher
- MethodArgumentRequiredMatcher
- MethodArgumentRequiredStaticMatcher
- MethodArgumentUnusedMatcher
- MethodCallMatcher
- MethodCallStaticMatcher
- InterfaceMethodChangedMatcher
- PropertyExistsStaticMatcher

Review

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

Issues 1

Files 18

Review log 34

  1. Garvin Hicking commented on patch set 1 06/11/26, 16:12

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 06/11/26, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103411

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 06/11/26, 17:06

  4. Garvin Hicking merged patch set 2 06/11/26, 17:06