diff --git a/modules/users_jwt/tests/src/Kernel/UsersJwtRequestTest.php b/modules/users_jwt/tests/src/Kernel/UsersJwtRequestTest.php
index 0c2fe93..8b47cb9 100644
--- a/modules/users_jwt/tests/src/Kernel/UsersJwtRequestTest.php
+++ b/modules/users_jwt/tests/src/Kernel/UsersJwtRequestTest.php
@@ -49,6 +49,7 @@ class UsersJwtRequestTest extends KernelTestBase {
 
   /**
    * Verify the authentication for a user.
+   * @doesNotPerformAssertions
    */
   public function testAuth() {
     /** @var \Drupal\users_jwt\UsersJwtKeyRepositoryInterface $key_repository */
diff --git a/src/Authentication/Event/JwtAuthBaseEvent.php b/src/Authentication/Event/JwtAuthBaseEvent.php
index 5b947d0..07d9439 100644
--- a/src/Authentication/Event/JwtAuthBaseEvent.php
+++ b/src/Authentication/Event/JwtAuthBaseEvent.php
@@ -8,7 +8,7 @@ use Drupal\jwt\JsonWebToken\JsonWebTokenInterface;
 /**
  * Class JwtAuthBaseEvent.
  */
-class JwtAuthBaseEvent extends Event {
+class JwtAuthBaseEvent extends \Symfony\Contracts\EventDispatcher\Event {
   /**
    * The JsonWebToken.
    *
diff --git a/src/Authentication/Provider/JwtAuth.php b/src/Authentication/Provider/JwtAuth.php
index c3696ef..5040104 100644
--- a/src/Authentication/Provider/JwtAuth.php
+++ b/src/Authentication/Provider/JwtAuth.php
@@ -71,13 +71,13 @@ class JwtAuth implements AuthenticationProviderInterface {
 
     $validate = new JwtAuthValidateEvent($jwt);
     // Signature is validated, but allow modules to do additional validation.
-    $this->eventDispatcher->dispatch(JwtAuthEvents::VALIDATE, $validate);
+    $this->eventDispatcher->dispatch($validate, JwtAuthEvents::VALIDATE);
     if (!$validate->isValid()) {
       return NULL;
     }
 
     $valid = new JwtAuthValidEvent($jwt);
-    $this->eventDispatcher->dispatch(JwtAuthEvents::VALID, $valid);
+    $this->eventDispatcher->dispatch($valid, JwtAuthEvents::VALID);
     $user = $valid->getUser();
 
     if (!$user) {
@@ -95,7 +95,7 @@ class JwtAuth implements AuthenticationProviderInterface {
    */
   public function generateToken() {
     $event = new JwtAuthGenerateEvent(new JsonWebToken());
-    $this->eventDispatcher->dispatch(JwtAuthEvents::GENERATE, $event);
+    $this->eventDispatcher->dispatch($event, JwtAuthEvents::GENERATE);
     $jwt = $event->getToken();
     return $this->transcoder->encode($jwt);
   }
diff --git a/tests/src/Functional/JwtAuthTest.php b/tests/src/Functional/JwtAuthTest.php
index 861939b..1716411 100644
--- a/tests/src/Functional/JwtAuthTest.php
+++ b/tests/src/Functional/JwtAuthTest.php
@@ -53,7 +53,7 @@ class JwtAuthTest extends BrowserTestBase {
     $auth = $this->container->get('jwt.authentication.jwt');
     $token = $auth->generateToken();
     $decoded_jwt = $transcoder->decode($token);
-    $this->assertEqual($account->id(), $decoded_jwt->getClaim(['drupal', 'uid']));
+    $this->assertEquals($account->id(), $decoded_jwt->getClaim(['drupal', 'uid']));
     foreach (['jwt_test.11.1', 'jwt_test.11.2'] as $route_name) {
       $url = Url::fromRoute($route_name);
       foreach (['Authorization', 'JWT-Authorization'] as $header_name) {
@@ -97,9 +97,9 @@ class JwtAuthTest extends BrowserTestBase {
     // cache if jwt credentials are provided.
     $url = Url::fromRoute('jwt_test.10');
     $this->drupalGet($url);
-    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS');
+    $this->assertEquals($this->drupalGetHeader('X-Drupal-Cache'), 'MISS');
     $this->drupalGet($url);
-    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');
+    $this->assertEquals($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');
     foreach (['Authorization', 'JWT-Authorization'] as $header_name) {
       $headers = [
         $header_name => 'Bearer ' . $token,
