Review main Merged

63184[BUGFIX] Allow Tree DataProviders with original constructor

Benni Mack CR +2 V +2 Easy +27 −1 updated 03/06/20, 09:13

Commit message

If a treedataprovider (e.g. from news) extends from Core's
constructor, Core hands in various multiple arguments.

However, Core is configured to only hand in one argument,
which is auto-wired. So there are multiple options:

- Third-party extensions would need to be autowiring their
signatures as well, however would never receive the EventDispatcher
object.
- Reflect on the constructor method and hand in the EventDispatcher
  manually, but also with the custom arguments as an additional argument
- throw away the custom configuration options and use setter injection
  for the options

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Susi Moog +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1215

  1. Benni Mack uploaded patch set 1 02/10/20, 08:29

  2. Georg Ringer rebased onto patch set 2 02/12/20, 20:17

  3. TYPO3com voted on patch set 2 V -1 02/12/20, 20:39 Completed build in 22m 22s on Wed, 12 Feb, 08:39 PM Test Summary: 12 of 71712 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16

  4. Christoph Lehmann commented on patch set 2 02/17/20, 10:16

    TreeDataProviderFactory.php:45

    $tcaConfiguration['treeConfig']['dataProvider'] may not contain the final class, or? See \TYPO3\CMS\Core\Utility\GeneralUtility::getClassName() Unhappily it's not public
  5. Benni Mack updated the commit message in patch set 3 03/02/20, 20:33

  6. TYPO3com voted on patch set 3 V -1 03/02/20, 20:47 Completed build in 13m 32s on Mon, 2 Mar, 08:47 PM Test Summary: 13 of 72291 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-929

  7. Benni Mack uploaded patch set 4 03/03/20, 10:58

  8. Benni Mack commented on patch set 4 03/03/20, 11:02

    TreeDataProviderFactory.php:45 Reply Unresolved

    yeah, but the case would be: - I have a custom dataProvider - The custom dataProvider is not having a custom __construct() method - The custom dataProvider is XCLASSed? In this case, I would recommend e.g. EXT:news (which is why this patch is built) to use a custom constructor in the first place.
  9. TYPO3com voted on patch set 4 V +1 03/03/20, 11:11 Completed build in 12m 59s on Tue, 3 Mar, 11:11 AM Test Summary: 72114 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-943

  10. Georg Ringer voted on patch set 4 V +1 CR +1 03/03/20, 11:44

  11. Georg Ringer voted on patch set 4 V 0 CR 0 03/03/20, 11:45

  12. Georg Ringer voted on patch set 4 V +1 CR +1 03/03/20, 13:36

  13. Susi Moog voted on patch set 4 CR +1 03/03/20, 16:42

  14. Susi Moog voted on patch set 4 V +2 CR +2 03/06/20, 09:13

  15. Susi Moog merged patch set 5 03/06/20, 09:13