#106043ExtensionScanner failes on concated dynamic method names
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}();Reviews 4
History 312
-
Gerrit Code Review pushed patch set 1 for main to change 88047 status
NewUnder Review 02/06/25, 08:36 -
Gerrit Code Review pushed patch set 2 for main to change 88047 02/06/25, 08:39
-
Gerrit Code Review pushed patch set 2 for main to change 88046 02/06/25, 08:44
-
Garvin Hicking commented 02/06/25, 08:47
-
Gerrit Code Review pushed patch set 3 for main to change 88047 02/06/25, 09:08
-
Gerrit Code Review pushed patch set 3 for main to change 88046 02/06/25, 09:21
-
Gerrit Code Review pushed patch set 4 for main to change 88047 02/06/25, 09:22
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88079 02/07/25, 13:18
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 88081 02/07/25, 13:36
-
Gerrit Code Review pushed patch set 2 for 12.4 to change 88081 02/07/25, 13:45
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % 02/07/25, 15:45Applied in changeset commit:0eaded70abc54fe28d2278e9ea100b70698627a6.
-
Benni Mack changed status
ResolvedClosed 12/02/25, 14:26
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.