Bug #90722
closedHandle constructor arguments in extension scanner correctly
100%
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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Oliver Hader over 4 years ago
- File scanner.png scanner.png added
Having the patch applied, it should look similar to the following for new
and GeneralUtility::makeInstance
...
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Oliver Hader over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d6ad3ad186bc3bfdadeb1ae8bbafff57163a7829.
Updated by Christian Eßl over 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
Updated by Anja Leichsenring over 4 years ago
- Related to Bug #91866: extensionScannerRstFileReferences check throws warnings added