Review main Merged

88046[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
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 912

  1. Garvin Hicking uploaded patch set 1 02/06/25, 08:36

  2. Garvin Hicking uploaded patch set 2 02/06/25, 08:44

  3. Garvin Hicking commented on patch set 2 02/06/25, 08:44

    Please see https://review.typo3.org/c/Packages/TYPO3.CMS/+/88047 for a small excursion on how this path leads to anger...
  4. core-ci voted on patch set 1 V -1 02/06/25, 08:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73630

  5. core-ci voted on patch set 2 V -1 02/06/25, 08:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73634

  6. Garvin Hicking commented on patch set 3 V -1 02/06/25, 09:21

    Published edit on patch set 2.
  7. core-ci voted on patch set 3 V +1 02/06/25, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73638

  8. Christian Kuhn voted on patch set 3 CR +1 02/06/25, 10:57

  9. Christian Kuhn voted on patch set 3 V +1 02/07/25, 12:37

  10. Stefan Bürk voted on patch set 3 CR +1 V +1 02/07/25, 12:45

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

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