Skip to content

Commit

Permalink
add symfony 5 support (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-h-1 authored Feb 18, 2020
1 parent f8c67b4 commit ce5b0d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"ext-bcmath": "*",
"doctrine/dbal": "^2.5",
"doctrine/collections": "^1.3",
"symfony/event-dispatcher": "^2.8|^3.1|^4.0",
"symfony/dependency-injection": "^2.8|^3.1|^4.0",
"symfony/event-dispatcher": "^2.8|^3.1|^4.0|^5.0",
"symfony/dependency-injection": "^2.8|^3.1|^4.0|^5.0",
"psr/simple-cache": "^1.0"
},
"require-dev": {
Expand Down
6 changes: 3 additions & 3 deletions src/MySQLReplication/Event/DTO/EventDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

use JsonSerializable;
use MySQLReplication\Event\EventInfo;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\GenericEvent;

/**
* @see https://dev.mysql.com/doc/internals/en/event-meanings.html
*/
abstract class EventDTO extends Event implements JsonSerializable
abstract class EventDTO extends GenericEvent implements JsonSerializable
{
protected $eventInfo;

Expand All @@ -28,4 +28,4 @@ public function getEventInfo(): EventInfo
abstract public function getType(): string;

abstract public function __toString(): string;
}
}
2 changes: 1 addition & 1 deletion src/MySQLReplication/Event/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private function filterDummyMariaDbEvents(QueryDTO $queryDTO): ?QueryDTO
private function dispatch(EventDTO $eventDTO = null): void
{
if (null !== $eventDTO) {
$this->eventDispatcher->dispatch($eventDTO->getType(), $eventDTO);
$this->eventDispatcher->dispatch($eventDTO, $eventDTO->getType());
}
}
}

0 comments on commit ce5b0d2

Please sign in to comment.