diff --git a/.travis.yml b/.travis.yml index c4169e4..fc24f20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ php: - 7.2 - 7.3 - 7.4 + - 8.0 + - 8.1 - nightly env: @@ -22,7 +24,7 @@ env: matrix: allow_failures: - - php: 7.4 + - php: 8.1 - php: nightly before_script: diff --git a/composer.json b/composer.json index 55d7efa..650fefd 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,10 @@ } ], "require": { - "php": "^5.5 | ^7.0", - "symfony/process": "^2.8 | ^3.2 | ^4.0", + "php": "^5.5 | ^7.0 | ^8.0", + "symfony/process": "^2.8 | ^3.2 | ^4.0 | ^5.0", "graze/data-structure": "^2.0", - "symfony/event-dispatcher": "^2.8 | ^3.2 | ^4.0", + "symfony/event-dispatcher": "^2.8 | ^3.2 | ^4.0 | ^5.0", "psr/log": "^1.0" }, "require-dev": { diff --git a/src/Event/EventDispatcherTrait.php b/src/Event/EventDispatcherTrait.php index 358df99..e8c7e4a 100644 --- a/src/Event/EventDispatcherTrait.php +++ b/src/Event/EventDispatcherTrait.php @@ -13,7 +13,7 @@ namespace Graze\ParallelProcess\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -60,7 +60,7 @@ public function addListener($name, callable $handler) protected function dispatch($name, Event $event) { $this->assertEventName($name); - $this->getEventDispatcher()->dispatch($name, $event); + $this->getEventDispatcher()->dispatch($event, $name); return $this; } diff --git a/src/Event/PriorityChangedEvent.php b/src/Event/PriorityChangedEvent.php index b609c1e..adcaa6d 100644 --- a/src/Event/PriorityChangedEvent.php +++ b/src/Event/PriorityChangedEvent.php @@ -14,7 +14,7 @@ namespace Graze\ParallelProcess\Event; use Graze\ParallelProcess\PrioritisedInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; class PriorityChangedEvent extends Event { diff --git a/src/Event/RunEvent.php b/src/Event/RunEvent.php index 397b3dd..c4f0c72 100644 --- a/src/Event/RunEvent.php +++ b/src/Event/RunEvent.php @@ -14,7 +14,7 @@ namespace Graze\ParallelProcess\Event; use Graze\ParallelProcess\RunInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; class RunEvent extends Event {