| 1 | <?php |
||
| 2 | |||
| 3 | namespace EightPoints\Bundle\GuzzleBundle\Events; |
||
| 4 | |||
| 5 | use Symfony\Component\EventDispatcher\Event as BaseEvent; |
||
| 6 | use Symfony\Component\EventDispatcher\EventDispatcher; |
||
| 7 | use Symfony\Contracts\EventDispatcher\Event as ContractsBaseEvent; |
||
| 8 | use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @see: https://github.com/8p/EightPointsGuzzleBundle/pull/261 |
||
| 12 | * @see: https://github.com/8p/EightPointsGuzzleBundle/pull/265 |
||
| 13 | * |
||
| 14 | * SF 4.3 introduced Contracts and deprecated interfaces used before. |
||
| 15 | * This file is a layer to support different versions and don't cause deprecation messages. |
||
| 16 | */ |
||
| 17 | if (is_subclass_of(EventDispatcher::class, EventDispatcherInterface::class)) { |
||
| 18 | class Event extends ContractsBaseEvent |
||
| 19 | { |
||
| 20 | } |
||
| 21 | } else { |
||
| 22 | class Event extends BaseEvent |
||
|
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||
| 23 | { |
||
| 24 | } |
||
| 25 | } |
||
| 26 |