[Symfony 5] Symfony\Component\EventDispatcher\Event is replaced by Symfony/Contracts/EventDispatcher/Event
Symfony/Component/EventDispatcher/Event is deprecated in Symfony 4.3 and replaced with Symfony/Contracts/EventDispatcher/Event in Symfony 5.
Applies to src/Event/SubscriberEvent.php and src/Event/WebhookEvent.php.
Maybe a candidate for the 2.0 branch mentioned? https://github.com/welpdev/mailchimp-bundle/issues/31
Hey, thanks! sure thing, as I said in latest PR https://github.com/welpdev/mailchimp-bundle/pull/39#issuecomment-894338936, I'm not using this anymore, not even using Mailchimp, so if you're interested to become a maintainer and work on the v2.X feel free to ask me :ok_hand:
I fixed this issue in a fork https://packagist.org/packages/dx-solutions/mailchimp-bundle
Feel free to open a PR or I can put you as maintainer if you want @EvertAlbert
I'm getting the same error : Attempted to load class "Event" from namespace "Symfony\Component\EventDispatcher". Did you forget a "use" statement for e.g. "Symfony\Contracts\EventDispatcher\Event"? when I call newUser method :
public function newUser(Abonne $abonne)
{
// ...
$subscriber = new Subscriber($abonne->getEmail(), [
'FIRSTNAME' => $abonne->getName(),
], [
'language' => 'fr'
]);
$this->eventDispatcher->dispatch(
new SubscriberEvent($this->listId, $subscriber),
SubscriberEvent::EVENT_SUBSCRIBE
);
}