$container->
addCompilerPass(new ResettableServicePass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32
);
$container->
addCompilerPass(new RegisterLocaleAwareServicesPass());
$container->
addCompilerPass(new TestServiceContainerWeakRefPass(), PassConfig::TYPE_BEFORE_REMOVING, -32
);
$container->
addCompilerPass(new TestServiceContainerRealRefPass(), PassConfig::TYPE_AFTER_REMOVING
);
$this->
addCompilerPassIfExists($container, AddMimeTypeGuesserPass::
class);
$this->
addCompilerPassIfExists($container, AddScheduleMessengerPass::
class);
$this->
addCompilerPassIfExists($container, MessengerPass::
class);
$this->
addCompilerPassIfExists($container, HttpClientPass::
class);
$this->
addCompilerPassIfExists($container, AddAutoMappingConfigurationPass::
class);
$container->
addCompilerPass(new RegisterReverseContainerPass(true
));
$container->
addCompilerPass(new RegisterReverseContainerPass(false
), PassConfig::TYPE_AFTER_REMOVING
);
$container->
addCompilerPass(new RemoveUnusedSessionMarshallingHandlerPass());
if ($container->
getParameter('kernel.debug'
)) { $container->
addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 2
);
$container->
addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING
);
$container->
addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255
);
$container->
addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING
);
} } private function addCompilerPassIfExists(ContainerBuilder
$container, string
$class, string
$type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int
$priority = 0
): void
{