Project

General

Profile

Actions

Bug #90722

closed

Handle constructor arguments in extension scanner correctly

Added by Oliver Hader about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2020-03-10
Due date:
% Done:

100%

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

Description

Handling constructor arguments in extension scanner did not work since constructors are not directly called like a method would be called. Constructors are invoked instead using the new statement. Besides that GeneratorClassResolver only supported string class names (e.g. 'Example\\MyClass') when being invoked via GeneralUtility::makeInstance.

Scanner configurations related to __construct invocation in terms of creating a new class instance are now handled in their own ConstructorArgumentMatcher. Besides that, GeneratorClassResolver supports GeneralUtility::makeInstance(Example\MyClass::class, 123) as well.


Files

scanner.png (91.5 KB) scanner.png Oliver Hader, 2020-03-10 20:57

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #91128: PHP Catchable Fatal Error: Object of class PhpParser\Node\Expr\PropertyFetch could not be converted to stringClosed2020-04-19

Actions
Related to TYPO3 Core - Bug #91866: extensionScannerRstFileReferences check throws warningsClosedAnja Leichsenring2020-07-25

Actions
Actions

Also available in: Atom PDF