Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Symfony 5] Symfony\Component\EventDispatcher\Event is replaced by Symfony/Contracts/EventDispatcher/Event #40

Open
Roensby opened this issue Aug 13, 2021 · 4 comments

Comments

@Roensby
Copy link

Roensby commented Aug 13, 2021

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?
#31

@Nightbr
Copy link
Member

Nightbr commented Aug 13, 2021

Hey, thanks! sure thing, as I said in latest PR #39 (comment), 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 👌

@EvertAlbert
Copy link

I fixed this issue in a fork https://packagist.org/packages/dx-solutions/mailchimp-bundle

@Nightbr
Copy link
Member

Nightbr commented Oct 18, 2021

Feel free to open a PR or I can put you as maintainer if you want @EvertAlbert

@kasali
Copy link

kasali commented Jan 19, 2024

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
            
        );
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants