1 | <?php |
||
24 | class FOSHttpCacheBundle extends Bundle |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | 2 | public function build(ContainerBuilder $container) |
|
30 | { |
||
31 | 2 | $container->addCompilerPass(new LoggerPass()); |
|
32 | 2 | $container->addCompilerPass(new TagListenerPass()); |
|
33 | 2 | $container->addCompilerPass(new HashGeneratorPass()); |
|
34 | 2 | if (version_compare(Kernel::VERSION, '3.4', '>=') |
|
35 | 2 | && version_compare(Kernel::VERSION, '4.1', '<') |
|
36 | ) { |
||
37 | $container->addCompilerPass(new SessionListenerRemovePass()); |
||
38 | } |
||
39 | |||
40 | // Symfony 3.3 and higher |
||
41 | 2 | if (method_exists($container, 'registerForAutoconfiguration')) { |
|
42 | $container |
||
43 | 2 | ->registerForAutoconfiguration(ContextProvider::class) |
|
44 | 2 | ->addTag('fos_http_cache.user_context_provider'); |
|
45 | } |
||
46 | 2 | } |
|
47 | |||
48 | 4 | public function registerCommands(Application $application) |
|
52 | } |
||
53 |