@@ 23-29 (lines=7) @@ | ||
20 | use Symfony\Component\HttpKernel\EventListener\SessionListener as BaseSessionListener; |
|
21 | use Symfony\Component\HttpKernel\Kernel; |
|
22 | ||
23 | if (Kernel::MAJOR_VERSION >= 5) { |
|
24 | class_alias(RequestEvent::class, 'FOS\HttpCacheBundle\EventListener\SessionRequestEvent'); |
|
25 | class_alias(ResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\SessionResponseEvent'); |
|
26 | } else { |
|
27 | class_alias(GetResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\SessionRequestEvent'); |
|
28 | class_alias(FilterResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\SessionResponseEvent'); |
|
29 | } |
|
30 | ||
31 | /** |
|
32 | * Decorates the default Symfony session listener. |
@@ 31-37 (lines=7) @@ | ||
28 | use Symfony\Component\HttpKernel\KernelEvents; |
|
29 | use Symfony\Component\OptionsResolver\OptionsResolver; |
|
30 | ||
31 | if (Kernel::MAJOR_VERSION >= 5) { |
|
32 | class_alias(RequestEvent::class, 'FOS\HttpCacheBundle\EventListener\UserContextRequestEvent'); |
|
33 | class_alias(ResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\UserContextResponseEvent'); |
|
34 | } else { |
|
35 | class_alias(GetResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\UserContextRequestEvent'); |
|
36 | class_alias(FilterResponseEvent::class, 'FOS\HttpCacheBundle\EventListener\UserContextResponseEvent'); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * Check requests and responses with the matcher. |