Project

General

Profile

Actions

Bug #106043

closed

ExtensionScanner failes on concated dynamic method names

Added by Jan Delius 16 days ago. Updated 9 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2025-01-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When running the extension scanner, we got the following message in our log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined property: PhpParser\Node\Expr\BinaryOp\Concat::$name in /var/www/cms/vendor/typo3/cms-install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php line 90 | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/cms/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php in line 141. Requested URL: https://fvde.jde.nng-dev.de/typo3/install.php?install%5Bcontroller%5D=upgrade&install%5Bcontext%5D=backend

This seems to be fired at https://github.com/TYPO3/typo3/blob/b1e36ce3dae0889a1539aab7f192a5221e96311e/typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php#L85 if the MethodCall name is of type PhpParser\Node\Expr\BinaryOp\Concat. This is the case in the following example:

$myObject = new MyClass();
$methodSuffix = $anyDynamicStringGivenFromMyFunction;

$myObject->{'do' . $methodSuffix}();
Actions #1

Updated by Gerrit Code Review 10 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88047

Actions #2

Updated by Gerrit Code Review 10 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88047

Actions #3

Updated by Gerrit Code Review 10 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88046

Actions #4

Updated by Garvin Hicking 10 days ago

This is definitely a problem and not only occurs in one matcher.

Statical analysis like this is not a good solution, we probably will not be able to really resolve introspecting method calls like this.

Please see the attached two patches for this issue on a small excursion. I would favor:

https://review.typo3.org/c/Packages/TYPO3.CMS/+/88046

to go forward and silently ignore any non-resolvable method calls.

Actions #5

Updated by Gerrit Code Review 10 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88047

Actions #6

Updated by Gerrit Code Review 10 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88046

Actions #7

Updated by Gerrit Code Review 10 days ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88047

Actions #8

Updated by Gerrit Code Review 9 days ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88079

Actions #9

Updated by Gerrit Code Review 9 days ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88081

Actions #10

Updated by Gerrit Code Review 9 days ago

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88081

Actions #11

Updated by Garvin Hicking 9 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF