Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Make all events extend one parent #101

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/Event/FeatureToggleDisabledEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

namespace Unleash\Client\Event;

use Symfony\Contracts\EventDispatcher\Event;
use Unleash\Client\Configuration\Context;
use Unleash\Client\DTO\Feature;

if (!class_exists(Event::class)) {
require __DIR__ . '/../../stubs/event-dispatcher/Event.php';
}

final class FeatureToggleDisabledEvent extends Event
final class FeatureToggleDisabledEvent extends AbstractEvent
{
/**
* @internal
Expand Down
7 changes: 1 addition & 6 deletions src/Event/FeatureToggleMissingStrategyHandlerEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

namespace Unleash\Client\Event;

use Symfony\Contracts\EventDispatcher\Event;
use Unleash\Client\Configuration\Context;
use Unleash\Client\DTO\Feature;

if (!class_exists(Event::class)) {
require __DIR__ . '/../../stubs/event-dispatcher/Event.php';
}

final class FeatureToggleMissingStrategyHandlerEvent extends Event
final class FeatureToggleMissingStrategyHandlerEvent extends AbstractEvent
{
/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion src/Event/FeatureToggleNotFoundEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require __DIR__ . '/../../stubs/event-dispatcher/Event.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not also be removed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, don't know how I missed it, it's removed now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! This is why we have PRs!

}

final class FeatureToggleNotFoundEvent extends Event
final class FeatureToggleNotFoundEvent extends AbstractEvent
{
/**
* @internal
Expand Down