File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace FOS \HttpCache ;
13
13
14
- use Symfony \Component \EventDispatcher \Event as BaseEvent ;
14
+ use Symfony \Component \EventDispatcher \Event as BaseEventDeprecated ;
15
+ use Symfony \Contracts \EventDispatcher \Event as BaseEvent ;
15
16
16
- class Event extends BaseEvent
17
+ // Symfony 4.3 BC layer
18
+ if (class_exists (BaseEvent::class)) {
19
+ class MiddleManEvent extends BaseEvent {}
20
+ } else {
21
+ class MiddleManEvent extends BaseEventDeprecated {}
22
+ }
23
+
24
+ class Event extends MiddleManEvent
17
25
{
18
26
private $ exception ;
19
27
Original file line number Diff line number Diff line change 11
11
12
12
namespace FOS \HttpCache \SymfonyCache ;
13
13
14
- use Symfony \Component \EventDispatcher \Event ;
14
+ use Symfony \Component \EventDispatcher \Event as EventDeprecated ;
15
15
use Symfony \Component \HttpFoundation \Request ;
16
16
use Symfony \Component \HttpFoundation \Response ;
17
17
use Symfony \Component \HttpKernel \HttpKernelInterface ;
18
+ use Symfony \Contracts \EventDispatcher \Event ;
19
+
20
+ // Symfony 4.3 BC layer
21
+ if (class_exists (Event::class)) {
22
+ class MiddleManCacheEvent extends Event {}
23
+ } else {
24
+ class MiddleManCacheEvent extends EventDeprecated {}
25
+ }
18
26
19
27
/**
20
28
* Event raised by the HttpCache kernel.
21
29
*
22
30
* @author David Buchmann <[email protected] >
23
31
*/
24
- class CacheEvent extends Event
32
+ class CacheEvent extends MiddleManCacheEvent
25
33
{
26
34
/**
27
35
* @var CacheInvalidation
You can’t perform that action at this time.
0 commit comments