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 #1

Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63676

Actions #2

Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63676

Actions #3

Updated by Oliver Hader about 4 years ago

Having the patch applied, it should look similar to the following for new and GeneralUtility::makeInstance...

Actions #4

Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63676

Actions #5

Updated by Gerrit Code Review about 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63676

Actions #6

Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63683

Actions #7

Updated by Oliver Hader about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions #9

Updated by Christian Eßl about 4 years ago

  • Related to Bug #91128: PHP Catchable Fatal Error: Object of class PhpParser\Node\Expr\PropertyFetch could not be converted to string added
Actions #10

Updated by Anja Leichsenring over 3 years ago

  • Related to Bug #91866: extensionScannerRstFileReferences check throws warnings added
Actions

Also available in: Atom PDF