#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
-
Garvin Hicking changed status
NewAccepted TYPO3 Version1213 Complexity easy Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-10-15T08:05:19+00:00" > 10/15/26, 08:05 </span> -
Gerrit Code Review pushed patch set 1 for main to change 96736 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2026-10-15T18:14:56+00:00" > 10/15/26, 18:14 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96756 <span data-processor="relativetime" data-value="2026-10-16T13:44:53+00:00" > 10/16/26, 13:44 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 96757 <span data-processor="relativetime" data-value="2026-10-16T13:45:02+00:00" > 10/16/26, 13:45 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-16T14:30:19+00:00" > 10/16/26, 14:30 </span>Applied 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