Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made the cache more context aware

  • Loading branch information...
commit d441e5bc48c3e5e5634a3035c7584135f927c7d6 1 parent e880d37
@dlsniper authored
Showing with 30 additions and 16 deletions.
  1. +30 −16 DependencyInjection/SensioFrameworkExtraExtension.php
View
46 DependencyInjection/SensioFrameworkExtraExtension.php
@@ -35,41 +35,55 @@ public function load(array $configs, ContainerBuilder $container)
if ($config['router']['annotations']) {
$annotationsToLoad[] = 'routing.xml';
+
+
+ $this->addClassesToCompile(array(
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener',
+ ));
}
if ($config['request']['converters']) {
$annotationsToLoad[] = 'converters.xml';
+
+ $this->addClassesToCompile(array(
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ParamConverter',
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener',
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DateTimeParamConverter',
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DoctrineParamConverter',
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface',
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager',
+ ));
}
if ($config['view']['annotations']) {
$annotationsToLoad[] = 'view.xml';
+
+ $this->addClassesToCompile(array(
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener',
+ ));
}
if ($config['cache']['annotations']) {
$annotationsToLoad[] = 'cache.xml';
+
+ $this->addClassesToCompile(array(
+ 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\CacheListener',
+ ));
+ }
+
+ if (empty($annotationsToLoad)) {
+ return ;
}
- if ($annotationsToLoad) {
- // must be first
- $loader->load('annotations.xml');
+ // must be first
+ $loader->load('annotations.xml');
- foreach ($annotationsToLoad as $config) {
- $loader->load($config);
- }
+ foreach ($annotationsToLoad as $config) {
+ $loader->load($config);
}
$this->addClassesToCompile(array(
'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationAnnotation',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ParamConverter',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\CacheListener',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DateTimeParamConverter',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DoctrineParamConverter',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface',
- 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager',
));
}
Please sign in to comment.
Something went wrong with that request. Please try again.