Bug #90399
Updated by Christoph Lehmann almost 5 years ago
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.
<pre>
if (!empty($tcaConfiguration['treeConfig']['dataProvider'])) {
$dataProvider = GeneralUtility::makeInstance($tcaConfiguration['treeConfig']['dataProvider'], $tcaConfiguration, $table, $field, $currentValue);
}
</pre>
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
<pre>
<?php
namespace TYPO3\CMS\Core\Tree\TableConfiguration;
class MyTreeDataProvider extends DatabaseTreeDataProvider {}
</pre>