// cache the container
$dumper =
new LegacyPhpDumper($container);
$content =
$dumper->
dump(['class' =>
$class, 'base_class' =>
$baseClass]);
if (!
$this->debug
) { $content = SymfonyKernel::
stripComments($content);
} $cache->
write($content,
$container->
getResources());
$xmlDumper =
new XmlDumper($container);
$xml =
$xmlDumper->
dump(['class' =>
$class, 'base_class' =>
$baseClass]);
file_put_contents($this->
getCacheDir() . '/container.xml',
$xml);
} /**
* Builds the service container.
*
* @throws Exception
* @throws RuntimeException
*
* @return ContainerBuilder The compiled service container
*/