Answer the question
In order to leave comments, you need to log in
Load xml serializer in Kernel?
There are a lot of serializers, I would like to connect them in the kernel, I'm not using services, something like
/**
* @param ContainerBuilder $container
* @param LoaderInterface $loader
*
* @throws \Exception
*/
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) : void {
$container->setParameter('container.autowiring.strict_mode', true);
$container->setParameter('container.dumper.inline_class_loader', true);
$confDir = $this->getProjectDir() . '/config';
$loader->load($confDir . '/packages/*' . self::CONFIG_EXTS, 'glob');
if (is_dir($confDir . '/packages/' . $this->environment)) {
$loader->load($confDir . '/packages/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob');
}
$loader->load($confDir . '/services' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/services_' . $this->environment . self::CONFIG_EXTS, 'glob');
// Custom section
$container->loadFromExtension(
'doctrine',
[
'orm' => [
'mappings' => $this->getNestedEntityMappingFiles(),
],
]
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question