Actions
Bug #90399
closedUnable to use EventDispatcherInterface in custom TreeDataProvider
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-02-16
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Select.html#treeconfig allows to set a custom DataProvider.
In TYPO3.CMS/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php:43 the custom DataProvider is created but there is no check if it implements the EventDispatcherInterface.
if (!empty($tcaConfiguration['treeConfig']['dataProvider'])) { $dataProvider = GeneralUtility::makeInstance($tcaConfiguration['treeConfig']['dataProvider'], $tcaConfiguration, $table, $field, $currentValue); }
This ends in an exception:
"Argument 1 passed to TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\MyTreeDataProvider::__construct() must implement interface Psr\\EventDispatcher\\EventDispatcherInterface, array given.
The custom DataProvider looks like this
<?php namespace TYPO3\CMS\Core\Tree\TableConfiguration; class MyTreeDataProvider extends DatabaseTreeDataProvider {}
Updated by Christoph Lehmann almost 5 years ago
- Related to Bug #90302: DatabaseTreeDataProvider crashes after switching to PSR-14 added
Updated by Christoph Lehmann almost 5 years ago
Is duplicate of #90302, please close it
Actions