Skip to content

Commit

Permalink
Use Symfony\Contracts\EventDispatcher\Event is available
Browse files Browse the repository at this point in the history
  • Loading branch information
XWB committed Nov 6, 2019
1 parent b4fde6a commit 1ef6ce5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
1 change: 0 additions & 1 deletion Event/CommentEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace FOS\CommentBundle\Event;

use FOS\CommentBundle\Model\CommentInterface;
use Symfony\Component\EventDispatcher\Event;

/**
* An event that occurs related to a comment.
Expand Down
26 changes: 26 additions & 0 deletions Event/Event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/*
* This file is part of the FOSCommentBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace FOS\CommentBundle\Event;

use Symfony\Component\EventDispatcher\Event as BaseEventDeprecated;
use Symfony\Contracts\EventDispatcher\Event as BaseEvent;

// Symfony 4.3 BC layer
if (class_exists(BaseEvent::class)) {
class Event extends BaseEvent
{
}
} else {
class Event extends BaseEventDeprecated
{
}
}
1 change: 0 additions & 1 deletion Event/ThreadEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace FOS\CommentBundle\Event;

use FOS\CommentBundle\Model\ThreadInterface;
use Symfony\Component\EventDispatcher\Event;

/**
* An event that occurs related to a thread.
Expand Down
1 change: 0 additions & 1 deletion Event/VoteEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace FOS\CommentBundle\Event;

use FOS\CommentBundle\Model\VoteInterface;
use Symfony\Component\EventDispatcher\Event;

/**
* An event that occurs related to a vote.
Expand Down
2 changes: 1 addition & 1 deletion Model/CommentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

namespace FOS\CommentBundle\Model;

use FOS\CommentBundle\Event\Event;
use FOS\CommentBundle\Event\CommentEvent;
use FOS\CommentBundle\Event\CommentPersistEvent;
use FOS\CommentBundle\Events;
use FOS\CommentBundle\Sorting\SortingFactory;
use FOS\CommentBundle\Sorting\SortingInterface;
use InvalidArgumentException;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;

Expand Down
2 changes: 1 addition & 1 deletion Model/ThreadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace FOS\CommentBundle\Model;

use FOS\CommentBundle\Event\Event;
use FOS\CommentBundle\Event\ThreadEvent;
use FOS\CommentBundle\Events;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;

Expand Down
2 changes: 1 addition & 1 deletion Model/VoteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

namespace FOS\CommentBundle\Model;

use FOS\CommentBundle\Event\Event;
use FOS\CommentBundle\Event\VoteEvent;
use FOS\CommentBundle\Event\VotePersistEvent;
use FOS\CommentBundle\Events;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;

Expand Down

0 comments on commit 1ef6ce5

Please sign in to comment.