File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-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
+ if (class_exists (BaseEvent::class)) {
18
+ class Event extends BaseEvent {}
19
+ } else {
20
+ class Event extends BaseEventDeprecated {}
21
+ }
22
+
23
+ class Event extends MiddleManEvent
17
24
{
18
25
private $ exception ;
19
26
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
+ if (class_exists (Event::class)) {
21
+ class MiddleManEvent extends Event {}
22
+ } else {
23
+ class MiddleManEvent extends EventDeprecated {}
24
+ }
18
25
19
26
/**
20
27
* Event raised by the HttpCache kernel.
21
28
*
22
29
* @author David Buchmann <[email protected] >
23
30
*/
24
- class CacheEvent extends Event
31
+ class CacheEvent extends MiddleManEvent
25
32
{
26
33
/**
27
34
* @var CacheInvalidation
You can’t perform that action at this time.
0 commit comments