Review main Merged

63676[BUGFIX] Handle constructor arguments in extension scanner correctly

Oliver Hader CR +2 V +2 Hard +524 −56 updated 03/11/20, 12:46

Commit message

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 (like
`'Example\\MyClass'`) when being invoked using
`GeneralUtility::makeInstance`.

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

`NameResolver` and `GeneratorClassesResolver` are executed in two
consecutive `NodeTraverser` instances - otherwise class names cannot
be resolved in a reliable way.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Andreas Kienast +1
    • TYPO3com +1 CI

Issues 1

Files 12

Review log 1014

  1. Oliver Hader uploaded patch set 1 03/10/20, 19:46

  2. TYPO3com voted on patch set 1 V -1 03/10/20, 19:46 Completed build in 24s on Tue, 10 Mar, 07:46 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1228

  3. Oliver Hader uploaded patch set 2 03/10/20, 19:48

  4. TYPO3com voted on patch set 2 V +1 03/10/20, 19:59 Completed build in 10m 52s on Tue, 10 Mar, 07:59 PM Test Summary: 72171 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1229

  5. Andreas Kienast voted on patch set 2 CR +1 03/10/20, 21:10

  6. Oliver Hader voted on patch set 2 CR -1 03/10/20, 21:52

  7. Oliver Hader uploaded patch set 3 03/10/20, 23:04

  8. TYPO3com voted on patch set 3 V -1 03/10/20, 23:05 Completed build in 23s on Tue, 10 Mar, 11:05 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1236

  9. Oliver Hader uploaded patch set 4 03/10/20, 23:09

  10. TYPO3com voted on patch set 4 V +1 03/10/20, 23:27 Completed build in 15m 03s on Tue, 10 Mar, 11:27 PM Test Summary: 72195 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1238

  11. Andreas Kienast voted on patch set 4 V +1 CR +1 03/11/20, 09:14

  12. Benni Mack voted on patch set 4 V +2 CR +2 03/11/20, 09:48

  13. Georg Ringer voted on patch set 4 CR +1 03/11/20, 09:55

  14. Oliver Hader merged patch set 5 03/11/20, 12:46