97166[TASK] Improve extension scanner
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 45
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/AbstractCoreMatcher.php4+30 −21
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/AbstractMethodImplementationMatcher.php2+16 −14
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ArrayDimensionMatcher.php+10 −7
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ArrayGlobalMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ClassConstantMatcher.php2+12 −8
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ClassNameMatcher.php+8 −7
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ConstantMatcher.php+10 −8
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ConstructorArgumentMatcher.php+37 −29
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/FunctionCallMatcher.php+9 −7
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php+3 −3
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodAnnotationMatcher.php2+6 −4
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodArgumentDroppedMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodArgumentDroppedStaticMatcher.php+9 −9
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodArgumentRequiredMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodArgumentRequiredStaticMatcher.php+9 −9
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodArgumentUnusedMatcher.php+14 −8
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodCallArgumentValueMatcher.php4+28 −20
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodCallMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/MethodCallStaticMatcher.php+9 −8
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/PropertyAnnotationMatcher.php+6 −4
Show 25 more files
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/PropertyExistsStaticMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/PropertyProtectedMatcher.php2+9 −6
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/PropertyPublicMatcher.php+7 −5
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ScalarStringMatcher.php+6 −9
- typo3/sysext/install/Classes/ExtensionScanner/Php/Visitor/CodeStatistics.phprenamed+17 −23
- typo3/sysext/install/Classes/ExtensionScanner/Php/Visitor/GeneratorClassesResolver.phprenamed+3 −8
- typo3/sysext/install/Classes/ExtensionScanner/Php/MatcherFactory.php+7 −7
- typo3/sysext/install/Classes/ExtensionScanner/CodeScannerInterface.php+5 −1
- typo3/sysext/install/Classes/ExtensionScanner/ExtensionScannerService.php+2 −2
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/AbstractCoreMatcherFixture.php+3 −3
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/ClassConstantMatcherFixture.php+1 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/MethodCallArgumentValueMatcherFixture.php+6 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/PropertyProtectedMatcherFixture.php+5 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ClassConstantMatcherTest.php+2 −2
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ClassNameMatcherTest.php+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ConstantMatcherTest.php+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ConstructorArgumentMatcherTest.php+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodAnnotationMatcherTest.php+37 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodCallStaticMatcherTest.php+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/PropertyAnnotationMatcherTest.php+37 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/PropertyProtectedMatcherTest.php+3 −0
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ScalarStringMatcherTest.php+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Visitor/Fixtures/CodeStatisticsFixture.phprenamed+1 −1
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Visitor/CodeStatisticsTest.phprenamed+2 −2
- typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Visitor/GeneratorClassesResolverTest.phprenamed+2 −2
Review log 1823
-
Simon Schaufelberger uploaded patch set 1 10/26/26, 16:17
-
core-ci voted on patch set 1 V +1 10/26/26, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112598
-
Oliver Klee voted on patch set 1 V +1 10/26/26, 18:11
-
Oli Bartsch commented on patch set 1 CR -1 10/26/26, 21:12
AbstractCoreMatcher.php:175php-parser 5.7/5.8 has no `Node\ArgPlaceholder`, so the PHPDoc and comment reference a class that doesn't exist and the runtime behavior is unchanged. Please remove those references and the commit message bullet until Core requires a version that ships it.AbstractMethodImplementationMatcher.php:133This still uses `getAttribute('startLine')` while the rest was switched. Please use `$method->getStartLine()`.MethodAnnotationMatcher.php:47Moving this before the `ClassMethod`/`Property` check means `@extensionScannerIgnoreFile` now takes effect in `MethodAnnotationMatcher` and `PropertyAnnotationMatcher`. That's a good fix, but it changes results while the commit message calls it a refactoring. Please mention it there and add ignore-file tests for both matchers.MethodCallArgumentValueMatcher.php:58The comment now sits above the `StaticCall` branch and says the opposite of the code. Please drop it or move it to the `MethodCall` branch.MethodCallArgumentValueMatcher.php:122The `isset()` guard is replaced by a direct index read on `getArgs()`. Calls with fewer arguments than `argumentIndex` (e.g. `configurePlugin()` with 4 args, index 5) and first-class callables now raise "Undefined array key" or an `AssertionError`. Please use `$node->getRawArgs()[$argumentMatchArray['argumentIndex']] ?? null` and require `$argument instanceof Node\Arg` before checking `String_`/`Int_`/`Float_`. Fixture lines with too few arguments and a first-class callable would cover it.PropertyProtectedMatcher.php:55This drops receivers like `$this->dataHandler->prop`, `$GLOBALS['X']->prop` and `$foo->bar()->prop`, which the old `($node->var->name ?? '') !== 'this'` check matched. Please exclude only a variable named `this`: `&& !($node->var instanceof Variable && $node->var->name === 'this')`. Please also add fixture lines for those three receivers. -
Simon Schaufelberger commented on patch set 1 10/26/26, 21:59
AbstractCoreMatcher.php:175ReplyDoneAbstractMethodImplementationMatcher.php:133ReplyDone -
Simon Schaufelberger uploaded patch set 2
CR -1V +110/26/26, 22:13 -
Simon Schaufelberger commented on patch set 2 10/26/26, 22:19
MethodAnnotationMatcher.php:47ReplyDoneMethodCallArgumentValueMatcher.php:58ReplyDoneMethodCallArgumentValueMatcher.php:122ReplyDonePropertyProtectedMatcher.php:55ReplyDone -
Simon Schaufelberger updated the commit message in patch set 3 10/26/26, 22:23
-
core-ci voted on patch set 3 V +1 10/26/26, 22:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112619
-
Simon Schaufelberger uploaded patch set 4
V +110/26/26, 22:51 -
core-ci voted on patch set 4 V +1 10/26/26, 22:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112620
-
Oliver Klee voted on patch set 4 V +1 10/27/26, 10:50
-
Garvin Hicking commented on patch set 4 CR +1 V +1 10/27/26, 11:29
Thanks for that work. Minor commit message comments only! 😊 Waiting for feedback of @bo@cedev.de before proceeding with a merge though.I think this bullet no longer applies, don't add differences from PS1 to PS4.I think this bullet no longer applies, don't add differences from PS1 to PS4.ClassConstantMatcher.php:55This bugfix here could be noted in the commit message's bullet (optional for me) -
Simon Schaufelberger updated the commit message in patch set 5
CR +1V +110/27/26, 17:28 -
Simon Schaufelberger commented on patch set 4 10/27/26, 17:28
Reply
This refers to `\TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallArgumentValueMatcher::isArgumentMatched`Reply
this refers to `\TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyProtectedMatcher::enterNode`ClassConstantMatcher.php:55ReplyDone -
Garvin Hicking commented on patch set 5 CR +1 V +1 10/27/26, 17:46
Reply
AcknowledgedReply
Acknowledged -
core-ci voted on patch set 5 V +1 10/27/26, 18:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112652
-
Oli Bartsch uploaded patch set 6
CR +1V +110/28/26, 10:22 -
Oli Bartsch voted on patch set 6 CR +1 V +1 10/28/26, 10:24
-
core-ci voted on patch set 6 V +1 10/28/26, 10:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112702
-
Garvin Hicking voted on patch set 6 CR +1 V +1 10/28/26, 12:02
-
Oli Bartsch commented on patch set 6 CR +2 V +2 10/28/26, 13:29
AbstractCoreMatcher.php:36ReplyDone -
Oli Bartsch merged patch set 7 10/28/26, 13:29
AbstractCoreMatcher.php:36