->
setLazy(true
);
$container->
compile();
$fileSystem =
new Filesystem();
$temporaryPath =
$fileSystem->
tempnam(sys_get_temp_dir(), 'symfonyManagerRegistryTest'
);
$fileSystem->
remove($temporaryPath);
$fileSystem->
mkdir($temporaryPath);
$dumper =
new PhpDumper($container);
$dumper->
setProxyDumper(new ProxyDumper());
$containerFiles =
$dumper->
dump([ 'class' => 'LazyServiceProjectAsFilesServiceContainer',
'as_files' => true,
]);
array_walk( $containerFiles,
static function Dstring
$containerSources, string
$fileName) use ($temporaryPath): void
{ (new Filesystem())->
dumpFile($temporaryPath.'/'.
$fileName,
$containerSources);
} );