Bug #106043
closedExtensionScanner failes on concated dynamic method names
100%
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}();
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
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
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
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.
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
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
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
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
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
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
Updated by Garvin Hicking 9 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0eaded70abc54fe28d2278e9ea100b70698627a6.