Array ( [Container%s/removed-ids.php] => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'configurator_service' => true, 'configurator_service_simple' => true, 'decorated.pif-pouf' => true, 'decorator_service.inner' => true, 'errored_definition' => true, 'errored_one' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true, ]; [Container%s/getBAR2Service.php] => services['BAR'] = $instance = new \stdClass(); $instance->bar = ($this->services['bar'] ?? $this->getBarService()); return $instance; [Container%s/getBAR22Service.php] => services['BAR2'] = new \stdClass(); [Container%s/getBar23Service.php] => services['bar2'] = new \stdClass(); [Container%s/getBazService.php] => services['baz'] = $instance = new \Baz(); $instance->setFoo(($this->services['foo_with_inline'] ?? $this->load('getFooWithInlineService.php'))); return $instance; [Container%s/getConfiguredServiceService.php] => services['configured_service'] = $instance = new \stdClass(); $a = new \ConfClass(); $a->setFoo(($this->services['baz'] ?? $this->load('getBazService.php'))); $a->configureStdClass($instance); return $instance; [Container%s/getConfiguredServiceSimpleService.php] => services['configured_service_simple'] = $instance = new \stdClass(); (new \ConfClass('bar'))->configureStdClass($instance); return $instance; [Container%s/getDecoratorServiceService.php] => services['decorator_service'] = new \stdClass(); [Container%s/getDecoratorServiceWithNameService.php] => services['decorator_service_with_name'] = new \stdClass(); [Container%s/getDeprecatedServiceService.php] => services['deprecated_service'] = new \stdClass(); [Container%s/getFactoryServiceService.php] => services['factory_service'] = ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php'))->getInstance(); [Container%s/getFactoryServiceSimpleService.php] => services['factory_service_simple'] = $this->load('getFactorySimpleService.php')->getInstance(); [Container%s/getFactorySimpleService.php] => services['foo.baz'] ?? $this->load('getFoo_BazService.php')); $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, ['bar' => 'foo is bar', 'foobar' => 'bar'], true, $this); $instance->foo = 'bar'; $instance->moo = $a; $instance->qux = ['bar' => 'foo is bar', 'foobar' => 'bar']; $instance->setBar(($this->services['bar'] ?? $this->getBarService())); $instance->initialize(); sc_configure($instance); return $instance; [Container%s/getFoo_BazService.php] => services['foo.baz'] = $instance = \BazClass::getInstance(); \BazClass::configureStatic1($instance); return $instance; [Container%s/getFooBarService.php] => factories['foo_bar'] = function () { // Returns the public 'foo_bar' service. return new \Bar\FooClass(($this->services['deprecated_service'] ?? $this->load('getDeprecatedServiceService.php'))); }; return $this->factories['foo_bar'](); [Container%s/getFooWithInlineService.php] => services['foo_with_inline'] = $instance = new \Foo(); $a = new \Bar(); $a->pub = 'pub'; $a->setBaz(($this->services['baz'] ?? $this->load('getBazService.php'))); $instance->setBar($a); return $instance; [Container%s/getLazyContextService.php] => services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () { yield 'k1' => ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); yield 'k2' => $this; }, 2), new RewindableGenerator(function () { return new \EmptyIterator(); }, 0)); [Container%s/getLazyContextIgnoreInvalidRefService.php] => services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () { yield 0 => ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); }, 1), new RewindableGenerator(function () { return new \EmptyIterator(); }, 0)); [Container%s/getMethodCall1Service.php] => targetDir.''.'/Fixtures/includes/foo.php'; $this->services['method_call1'] = $instance = new \Bar\FooClass(); $instance->setBar(($this->services['foo'] ?? $this->load('getFooService.php'))); $instance->setBar(NULL); $instance->setBar((($this->services['foo'] ?? $this->load('getFooService.php'))->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default")))); return $instance; [Container%s/getNewFactoryServiceService.php] => foo = 'bar'; $this->services['new_factory_service'] = $instance = $a->getInstance(); $instance->foo = 'bar'; return $instance; [Container%s/getNonSharedFooService.php] => targetDir.''.'/Fixtures/includes/foo.php'; $this->factories['non_shared_foo'] = function () { return new \Bar\FooClass(); }; return $this->factories['non_shared_foo'](); [Container%s/getRuntimeErrorService.php] => services['runtime_error'] = new \stdClass($this->throw('Service "errored_definition" is broken.')); [Container%s/getServiceFromStaticMethodService.php] => services['service_from_static_method'] = \Bar\FooClass::getInstance(); [Container%s/getTaggedIteratorService.php] => services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ($this->services['foo'] ?? $this->load('getFooService.php')); yield 1 => ($this->privates['tagged_iterator_foo'] ?? ($this->privates['tagged_iterator_foo'] = new \Bar())); }, 2)); [Container%s/getThrowingOneService.php] => services['throwing_one'] = new \Bar\FooClass($this->throw('No-no-no-no')); [Container%s/ProjectServiceContainer.php] => buildParameters = $buildParameters; $this->containerDir = $containerDir; $this->targetDir = \dirname($containerDir); $this->parameters = $this->getDefaultParameters(); $this->services = $this->privates = []; $this->syntheticIds = [ 'request' => true, ]; $this->methodMap = [ 'bar' => 'getBarService', ]; $this->fileMap = [ 'BAR' => 'getBAR2Service.php', 'BAR2' => 'getBAR22Service.php', 'bar2' => 'getBar23Service.php', 'baz' => 'getBazService.php', 'configured_service' => 'getConfiguredServiceService.php', 'configured_service_simple' => 'getConfiguredServiceSimpleService.php', 'decorator_service' => 'getDecoratorServiceService.php', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService.php', 'deprecated_service' => 'getDeprecatedServiceService.php', 'factory_service' => 'getFactoryServiceService.php', 'factory_service_simple' => 'getFactoryServiceSimpleService.php', 'foo' => 'getFooService.php', 'foo.baz' => 'getFoo_BazService.php', 'foo_bar' => 'getFooBarService.php', 'foo_with_inline' => 'getFooWithInlineService.php', 'lazy_context' => 'getLazyContextService.php', 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService.php', 'method_call1' => 'getMethodCall1Service.php', 'new_factory_service' => 'getNewFactoryServiceService.php', 'non_shared_foo' => 'getNonSharedFooService.php', 'runtime_error' => 'getRuntimeErrorService.php', 'service_from_static_method' => 'getServiceFromStaticMethodService.php', 'tagged_iterator' => 'getTaggedIteratorService.php', 'throwing_one' => 'getThrowingOneService.php', ]; $this->aliases = [ 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', 'decorated' => 'decorator_service_with_name', ]; } 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) { return require $this->containerDir.\DIRECTORY_SEPARATOR.$file; } /** * Gets the public 'bar' shared service. * * @return \Bar\FooClass */ protected function getBarService() { $a = ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar')); $a->configure($instance); return $instance; } /** * @return array|bool|float|int|string|null */ public function getParameter($name) { $name = (string) $name; if (isset($this->buildParameters[$name])) { return $this->buildParameters[$name]; } if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } if (isset($this->loadedDynamicParameters[$name])) { return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); } return $this->parameters[$name]; } public function hasParameter($name): bool { $name = (string) $name; if (isset($this->buildParameters[$name])) { return true; } return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters); } public function setParameter($name, $value): void { throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); } public function getParameterBag(): ParameterBagInterface { if (null === $this->parameterBag) { $parameters = $this->parameters; foreach ($this->loadedDynamicParameters as $name => $loaded) { $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); } foreach ($this->buildParameters as $name => $value) { $parameters[$name] = $value; } $this->parameterBag = new FrozenParameterBag($parameters); } return $this->parameterBag; } private $loadedDynamicParameters = []; private $dynamicParameters = []; private function getDynamicParameter(string $name) { throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } protected function getDefaultParameters(): array { return [ 'baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar', ]; } protected function throw($message) { throw new RuntimeException($message); } } [ProjectServiceContainer.preload.php] => '%s', 'container.build_id' => '%s', 'container.build_time' => %d, ], __DIR__.\DIRECTORY_SEPARATOR.'Container%s'); )