@@ -84,6 +84,7 @@ public function build(ContainerBuilder $container)
84
84
$ container ->addCompilerPass (new AddConstraintValidatorsPass (), PassConfig::TYPE_BEFORE_REMOVING );
85
85
$ container ->addCompilerPass (new AddAnnotationsCachedReaderPass (), PassConfig::TYPE_BEFORE_REMOVING );
86
86
$ container ->addCompilerPass (new AddValidatorInitializersPass ());
87
+ $ this ->addCompilerPassIfExists ($ container , AddConsoleCommandPass::class);
87
88
$ container ->addCompilerPass (new TranslatorPass ());
88
89
$ container ->addCompilerPass (new LoggingTranslatorPass ());
89
90
$ container ->addCompilerPass (new AddCacheWarmerPass ());
@@ -92,15 +93,12 @@ public function build(ContainerBuilder $container)
92
93
$ container ->addCompilerPass (new TranslationExtractorPass ());
93
94
$ container ->addCompilerPass (new TranslationDumperPass ());
94
95
$ container ->addCompilerPass (new FragmentRendererPass (), PassConfig::TYPE_AFTER_REMOVING );
95
- if (class_exists (SerializerPass::class)) {
96
- $ container ->addCompilerPass (new SerializerPass ());
97
- }
96
+ $ this ->addCompilerPassIfExists ($ container , SerializerPass::class);
98
97
$ container ->addCompilerPass (new PropertyInfoPass ());
99
98
$ container ->addCompilerPass (new ControllerArgumentValueResolverPass ());
100
99
$ container ->addCompilerPass (new CachePoolPass (), PassConfig::TYPE_BEFORE_OPTIMIZATION , 32 );
101
100
$ container ->addCompilerPass (new ValidateWorkflowsPass ());
102
101
$ container ->addCompilerPass (new CachePoolClearerPass (), PassConfig::TYPE_AFTER_REMOVING );
103
- $ this ->addCompilerPassIfExists ($ container , AddConsoleCommandPass::class);
104
102
$ this ->addCompilerPassIfExists ($ container , FormPass::class);
105
103
106
104
if ($ container ->getParameter ('kernel.debug ' )) {
0 commit comments