#110828Extension scanner: first-class callable syntax crashes the argument matchers
Description
A static call in first-class callable syntax makes the extension scanner fail on the file that contains it.
AbstractCoreMatcher::isArgumentUnpackingUsed() reads $arg->unpack on every argument. For Foo::bar(...) the only argument is a PhpParser\Node\VariadicPlaceholder, which has no unpack property. Under the default SYS/exceptionalErrors the warning becomes an exception.
MethodArgumentDroppedStaticMatcher and MethodArgumentRequiredStaticMatcher call the method for every static call, so every static first-class callable is affected. The other matchers that use it are affected when the method name matches a rule.
Affected: 14.3.7 and main. 13.4 and 12.4 have the same code.
Steps to reproduce
Put this file into an extension:
<?php
namespace Vendor\Ext;
use TYPO3\CMS\Core\Utility\GeneralUtility;
final class Example
{
public function run(): array
{
return array_map(GeneralUtility::underscoredToUpperCamelCase(...), ['a_b']);
}
}
Then scan the extension in Admin Tools > Upgrade > Scan Extension Files.
Expected
The file is scanned. A first-class callable has no arguments to count, so the argument matchers do not report it.
Actual
The scan request for the file answers HTTP 500. The log shows TYPO3\CMS\Core\Error\Exception, code 1476107295:
PHP Warning: Undefined property: PhpParser\Node\VariadicPlaceholder::$unpack in typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/AbstractCoreMatcher.php line 170
Possible fix
Treat a VariadicPlaceholder like argument unpacking in isArgumentUnpackingUsed(). A patch follows on Gerrit.
Reviews 2
Related issues 1
History 24
-
Georg Tiefenbrunn changed Related to #110829 <span data-processor="relativetime" data-value="2026-09-29T07:20:23+00:00" > 09/29/26, 07:20 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96157 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-29T07:59:12+00:00" > 09/29/26, 07:59 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96212 <span data-processor="relativetime" data-value="2026-09-30T09:41:49+00:00" > 09/30/26, 09:41 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-30T09:45:10+00:00" > 09/30/26, 09:45 </span>
Applied in changeset commit:555e522f842de655a5833bea1be15a6b6ca7106b.