- Issue created by @rogerpfaff
- 🇪🇸Spain leandro713 🇪🇸 Madrid 🤠
yes, just change
use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
for
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
and change the constructor like:
public function __construct( array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config, CacheBackendInterface $cache, TimeInterface $time, EventDispatcherInterface $event_dispatcher, // <-- here the magic ClientInterface $http_client, Token $token, LoggerInterface $logger ) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->config = $config; $this->cache = $cache; $this->time = $time; $this->eventDispatcher = $event_dispatcher; $this->httpClient = $http_client; $this->token = $token; $this->logger = $logger; }
and done :-D