#111054Problem on https://docs.typo3.org/c/typo3/cms-dashboard/12.4/en-us/Developer/WidgetImplementation.html
Description
https://docs.typo3.org/permalink/typo3-cms-dashboard:widget-php-class
The constructor of the example class, especially the used class for $cache is a little bit misleading/ confusing in my opinion:
class RssWidget implements WidgetInterface, RequestAwareWidgetInterface
{
private ServerRequestInterface $request;
public function __construct(
private readonly WidgetConfigurationInterface $configuration,
private readonly Cache $cache,
private readonly BackendViewFactory $backendViewFactory,
private readonly ButtonProviderInterface $buttonProvider = null,
private readonly array $options = []
) {
}
The original source in typo3/cms-dashboard has the following use statement:
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface as Cache;
So the actual class used is TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
I would suggest replacing the Cache class in the example’s constructor with the actual class TYPO3\CMS\Core\Cache\Frontend\FrontendInterface, like this has already been fixed in the typo3/cms-dashboard RssWidget class from version 13
(or add the use statements)
Reviews 3
History 36
-
Thomas Rawiel commented 10/14/26, 13:16
-
Garvin Hicking changed status
NewAccepted TYPO3 Version1213 Complexity easy Sprint Focus On Location Sprint 10/15/26, 08:05 -
Gerrit Code Review pushed patch set 1 for main to change 96736 status
AcceptedUnder Review 10/15/26, 18:14 -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96756 10/16/26, 13:44
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 96757 10/16/26, 13:45
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 10/16/26, 14:30Applied in changeset commit:9715742e043f874e1968fcc17da6a9ed73d77a09.
Also, in the documentation for TYPO3 12
will produce a php error like
Should be
like in the documentation for TYPO3 13 and up of this page