Hallo Leute,
ich habe das QuickStart Plugin etwas erweitert und hole mir die Configwerte. In der DEV Version läuft es auch, in der Early Access erhalte ich folgenden Fehler:
Too few arguments to function Swag\PluginQuickStart\Subscriber\MySubscriber::__construct(), 0 passed in /var/www/clients/client1/web17/web/var/cache/prod_k379092f7_p2e1bf244/ContainerV1hTflz/srcShopware_Production_KernelProdContainer.php on line 2057 and exactly 1 expected {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Too few arguments to function Swag\\PluginQuickStart\\Subscriber\\MySubscriber::__construct(), 0 passed in /var/www/clients/client1/web17/web/var/cache/prod_k379092f7_p2e1bf244/ContainerV1hTflz/srcShopware_Production_KernelProdContainer.php on line 2057 and exactly 1 expected at /var/www/clients/client1/web17/web/custom/plugins/swag-docs-plugin-quick-start-master/src/Subscriber/MySubscriber.php:14)"}
Anbei auch der Code des Subscribers:
systemConfigService = $systemConfigService;
}
public static function getSubscribedEvents(): array
{
return[
StorefrontRenderEvent::class => 'onStorefrontRenderLoaded'
];
}
public function onStorefrontRenderLoaded(StorefrontRenderEvent $event)
{
// Do something
// E.g. work with the loaded entities: $event->getEntities()
$exampleConfig['example'] = $this->systemConfigService->get('PluginQuickStart.config.example');
$event->setParameter(self::CONFIG_NAMESPACE,$exampleConfig);
}
}