Remove EventSubscriber

Created on 8 February 2024, 6 months ago
Updated 26 February 2024, 5 months ago

Problem/Motivation

There are three empty EventSubscribers. The classes exist, and they subscribe to events, but the methods are blanks.
This looks like something someone started, but didn't finish.

Steps to reproduce

Proposed resolution

I don't think the code does anything and can be safely removed.

  • AuthmapAlterSubscriber
  • LoginSubscriber
  • RegisterSubscriber

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States bluegeek9

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @bluegeek9
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    Rajas Samse โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    I'm getting started on working on this issue.

  • Assigned to bluegeek9
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bluegeek9
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    Apologies for the delay. I've resolved the issue #3420267 but unfortunately, I'm facing an error when attempting to submit the merge request. I've included the file contents in the comments. Will submit ASAP once the GitLab glitch is sorted.

    AuthmapAlterSubscriber.php file

    <?php

    declare(strict_types=1);
    namespace Drupal\authorization\EventSubscriber;
    use Drupal\externalauth\Event\ExternalAuthEvents;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    /**
    * Authmap event subscriber.
    */
    class AuthmapAlterSubscriber implements EventSubscriberInterface {
    /**
    * Action to take on authorization.
    */
    // method removed
    /**
    * {@inheritdoc}
    */
    public static function getSubscribedEvents() {
    $events[ExternalAuthEvents::AUTHMAP_ALTER][] = ['onAuthmapAlter'];
    return $events;
    }
    }

    LoginSubscriber.php file

    <?php

    declare(strict_types=1);
    namespace Drupal\authorization\EventSubscriber;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    use Symfony\Component\HttpKernel\KernelEvents;
    /**
    * Login subscriber.
    */
    class LoginSubscriber implements EventSubscriberInterface {
    /**
    * Action on request.
    */
    // removed request method
    /**
    * Action on login.
    */
    // removed onLogin method
    /**
    * {@inheritdoc}
    */
    public static function getSubscribedEvents() {
    $events[KernelEvents::REQUEST][] = ['onRequest'];
    return $events;
    }
    }

    RegisterSubscriber.php file

    <?php

    declare(strict_types=1);
    namespace Drupal\authorization\EventSubscriber;
    use Drupal\externalauth\Event\ExternalAuthEvents;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    /**
    * Registration subscriber.
    */
    class RegisterSubscriber implements EventSubscriberInterface {
    /**
    * Action on register.
    */
    // removed onRegister method
    /**
    * {@inheritdoc}
    */
    public static function getSubscribedEvents() {
    $events[ExternalAuthEvents::REGISTER][] = ['onRegister'];
    return $events;
    }
    }

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bluegeek9

    @Rajas Samse,

    Please don't commit to my branch. If you don't use Drupal you shouldn't be submitting patches.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Rajas Samse

    Understood. I appreciate your concern. If there are specific issues with my code, please provide feedback so I can address them. I'm committed to following project guidelines.

  • Merge request !29Resolve #3420267 "Remove eventsubscriber" โ†’ (Merged) created by bluegeek9
  • Pipeline finished with Skipped
    6 months ago
    #93391
  • Issue was unassigned.
  • Status changed to Fixed 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bluegeek9
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024