File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1313
1414use ONGR \ElasticsearchBundle \DependencyInjection \Compiler \ManagerPass ;
1515use ONGR \ElasticsearchBundle \DependencyInjection \Compiler \MappingPass ;
16+ use Symfony \Component \DependencyInjection \Compiler \PassConfig ;
1617use Symfony \Component \DependencyInjection \ContainerBuilder ;
1718use Symfony \Component \HttpKernel \Bundle \Bundle ;
1819
@@ -28,7 +29,8 @@ public function build(ContainerBuilder $container)
2829 {
2930 parent ::build ($ container );
3031
31- $ container ->addCompilerPass (new MappingPass ());
32- $ container ->addCompilerPass (new ManagerPass ());
32+ // MappingPass need to be behind the Symfony `DecoratorServicePass` to allow decorating the annotation reader
33+ $ container ->addCompilerPass (new MappingPass (), PassConfig::TYPE_OPTIMIZE , -10 );
34+ $ container ->addCompilerPass (new ManagerPass (), PassConfig::TYPE_OPTIMIZE , -11 );
3335 }
3436}
You can’t perform that action at this time.
0 commit comments