Skip to content

Commit

Permalink
Added symfony 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob van Dam committed Aug 1, 2023
1 parent d7c2460 commit e35b502
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 465 deletions.
2 changes: 1 addition & 1 deletion Event/MailMotorSubscribedEvent.php
Expand Up @@ -2,7 +2,7 @@

namespace MailMotor\Bundle\MailMotorBundle\Event;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* This class is in fact an immutable event class holding all the data
Expand Down
2 changes: 1 addition & 1 deletion Event/MailMotorUnsubscribedEvent.php
Expand Up @@ -2,7 +2,7 @@

namespace MailMotor\Bundle\MailMotorBundle\Event;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* This class is in fact an immutable event class holding all the data
Expand Down
8 changes: 4 additions & 4 deletions Helper/Subscriber.php
Expand Up @@ -103,15 +103,15 @@ public function subscribe(
if ($subscribed) {
// dispatch subscribed event
$this->eventDispatcher->dispatch(
MailMotorSubscribedEvent::EVENT_NAME,
new MailMotorSubscribedEvent(
$email,
$this->getListId($listId),
$language,
$mergeFields,
$interests,
$doubleOptin
)
),
MailMotorSubscribedEvent::EVENT_NAME
);
}

Expand All @@ -128,11 +128,11 @@ public function unsubscribe(string $email, string $listId = null): bool
if ($unsubscribed) {
// dispatch unsubscribed event
$this->eventDispatcher->dispatch(
MailMotorUnsubscribedEvent::EVENT_NAME,
new MailMotorUnsubscribedEvent(
$email,
$this->getListId($listId)
)
),
MailMotorUnsubscribedEvent::EVENT_NAME
);
}

Expand Down
2 changes: 1 addition & 1 deletion MailMotorMailMotorBundle.php
Expand Up @@ -7,7 +7,7 @@
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* MailMotor MailMotor Bundle
* MailMotor Bundle
*
* @author Jeroen Desloovere <info@jeroendesloovere.be>
*/
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -15,10 +15,10 @@
],
"require": {
"php": "^7.4||^8.0",
"symfony/http-kernel": "^2.3|^3.0|^4.0"
"symfony/http-kernel": "^2.3|^3.0|^4.0|^5.0"
},
"require-dev": {
"symfony/framework-bundle": "^2.3|^3.0|^4.0",
"symfony/framework-bundle": "^2.3|^3.0|^4.0|^5.0",
"phpunit/phpunit": "^9.6"
},
"autoload": {
Expand Down

0 comments on commit e35b502

Please sign in to comment.