Review 13.4 Merged

88079[BUGFIX] Prevent type error in Extension Scanner

Garvin Hicking CR +2 V +2 Easy +19 −1 updated 02/07/25, 15:40

Commit message

Several extension scanner matchers scan a
MethodCall node type, but cannot deal with possible
method concatenation.

Concatenating method names may involve dynamic
variable resolving, which static analysis cannot
perform. Thus, it is a setup for failure to
try this.

Instead this patch gracefully ignores these method
calls to not throw a PHP type error on scanning
extensions.

Teachable moment: Try to not use dynamic method
calls like

```
$dynamic = '1';
$this->{'like' . $dynamic}($arg1, $arg2, $arg3);
```

Review

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

Issues 1

Files 7

Review log 34

  1. Garvin Hicking commented on patch set 1 02/07/25, 13:17

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 02/07/25, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73727

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 02/07/25, 15:40

  4. Garvin Hicking merged patch set 2 02/07/25, 15:40