[DependencyInjection] fix tests

This commit is contained in:
Christian Flothmann 2017-09-28 19:06:05 +02:00
parent 3fde0f0644
commit 08deb372f1
2 changed files with 5 additions and 17 deletions

View File

@ -274,8 +274,8 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
// Returns the public 'tagged_iterator' shared service. // Returns the public 'tagged_iterator' shared service.
return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load(__DIR__.'/getFooService.php')) && false ?: '_'}; yield 0 => ($this->services['foo'] ?? $this->load(__DIR__.'/getFooService.php'));
yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; yield 1 => ($this->privates['tagged_iterator_foo'] ?? $this->privates['tagged_iterator_foo'] = new \Bar());
}, 2)); }, 2));
[Container%s/getTaggedIteratorFooService.php] => <?php [Container%s/getTaggedIteratorFooService.php] => <?php
@ -285,7 +285,7 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
// Returns the private 'tagged_iterator_foo' shared service. // Returns the private 'tagged_iterator_foo' shared service.
return $this->services['tagged_iterator_foo'] = new \Bar(); return $this->privates['tagged_iterator_foo'] = new \Bar();
[Container%s/Container.php] => <?php [Container%s/Container.php] => <?php
@ -348,7 +348,6 @@ class Container%s extends Container
'new_factory_service' => __DIR__.'/getNewFactoryServiceService.php', 'new_factory_service' => __DIR__.'/getNewFactoryServiceService.php',
'service_from_static_method' => __DIR__.'/getServiceFromStaticMethodService.php', 'service_from_static_method' => __DIR__.'/getServiceFromStaticMethodService.php',
'tagged_iterator' => __DIR__.'/getTaggedIteratorService.php', 'tagged_iterator' => __DIR__.'/getTaggedIteratorService.php',
'tagged_iterator_foo' => __DIR__.'/getTaggedIteratorFooService.php',
); );
$this->aliases = array( $this->aliases = array(
'alias_for_alias' => 'foo', 'alias_for_alias' => 'foo',

View File

@ -53,7 +53,6 @@ class ProjectServiceContainer extends Container
'new_factory_service' => 'getNewFactoryServiceService', 'new_factory_service' => 'getNewFactoryServiceService',
'service_from_static_method' => 'getServiceFromStaticMethodService', 'service_from_static_method' => 'getServiceFromStaticMethodService',
'tagged_iterator' => 'getTaggedIteratorService', 'tagged_iterator' => 'getTaggedIteratorService',
'tagged_iterator_foo' => 'getTaggedIteratorFooService',
); );
$this->aliases = array( $this->aliases = array(
'alias_for_alias' => 'foo', 'alias_for_alias' => 'foo',
@ -382,8 +381,8 @@ class ProjectServiceContainer extends Container
protected function getTaggedIteratorService() protected function getTaggedIteratorService()
{ {
return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}; yield 0 => ($this->services['foo'] ?? $this->getFooService());
yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; yield 1 => ($this->privates['tagged_iterator_foo'] ?? $this->privates['tagged_iterator_foo'] = new \Bar());
}, 2)); }, 2));
} }
@ -401,16 +400,6 @@ class ProjectServiceContainer extends Container
return $this->privates['factory_simple'] = new \SimpleFactoryClass('foo'); return $this->privates['factory_simple'] = new \SimpleFactoryClass('foo');
} }
/**
* Gets the private 'tagged_iterator_foo' shared service.
*
* @return \Bar
*/
protected function getTaggedIteratorFooService()
{
return $this->services['tagged_iterator_foo'] = new \Bar();
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */