Array ( [Container%s/removed-ids.php] => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, ]; [Container%s/getClosureService.php] => services['closure'] = $instance = new \stdClass(); $instance->closures = [0 => function () use ($container): ?\stdClass { return ($container->services['foo'] ?? null); }]; return $instance; } } [Container%s/ProjectServiceContainer.php] => buildParameters = $buildParameters; $this->containerDir = $containerDir; $this->targetDir = \dirname($containerDir); $this->services = $this->privates = []; $this->methodMap = [ 'foo' => 'getFooService', ]; $this->fileMap = [ 'closure' => 'getClosureService', ]; $this->aliases = []; } public function compile(): void { throw new LogicException('You cannot compile a dumped container that was already compiled.'); } public function isCompiled(): bool { return true; } public function getRemovedIds(): array { return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php'; } protected function load($file, $lazyLoad = true) { if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) { return $class::do($this, $lazyLoad); } if ('.' === $file[-4]) { $class = substr($class, 0, -4); } else { $file .= '.php'; } $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; } /** * Gets the public 'foo' shared service. * * @return \FooClass */ protected function getFooService() { return $this->services['foo'] = new \FooClass(new \stdClass()); } } [ProjectServiceContainer.preload.php] => = 7.4 when preloading is desired use Symfony\Component\DependencyInjection\Dumper\Preloader; if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) { return; } require dirname(__DIR__, %d).'%svendor/autoload.php'; require __DIR__.'/Container%s/ProjectServiceContainer.php'; require __DIR__.'/Container%s/getClosureService.php'; $classes = []; $classes[] = 'FooClass'; $classes[] = 'Symfony\Component\DependencyInjection\ContainerInterface'; Preloader::preload($classes); [ProjectServiceContainer.php] => '%s', 'container.build_id' => '%s', 'container.build_time' => %d, ], __DIR__.\DIRECTORY_SEPARATOR.'Container%s'); )