Skip to content

Commit 284b808

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI Minor reword [HttpKernel] Make array vs "::" controller definitions consistent Fix tests [TwigBundle] Remove profiler related scripting [TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event [WebProfilerBundle] Hide inactive tabs from CSS [TwigBundle] Make deprecations scream in logs [TwigBundle] Hide logs if unavailable, i.e. webprofiler [TwigBundle] Break long lines in exceptions [WebProfilerBundle] Added missing link to profile token [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass Preserve URI fragment in HttpUtils::generateUri() [PhpUnitBridge] do not require an error context
2 parents 3d1c085 + d3e9dcb commit 284b808

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Compiler/ResolveInstanceofConditionalsPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ private function processDefinition(ContainerBuilder $container, $id, Definition
122122
->setBindings($bindings)
123123
->setArguments(array())
124124
->setMethodCalls(array())
125+
->setDecoratedService(null)
125126
->setTags(array())
126127
->setAbstract(true);
127128
}

Tests/Compiler/ResolveInstanceofConditionalsPassTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,30 @@ public function testProcessThrowsExceptionForArguments()
224224

225225
(new ResolveInstanceofConditionalsPass())->process($container);
226226
}
227+
228+
public function testMergeReset()
229+
{
230+
$container = new ContainerBuilder();
231+
232+
$container
233+
->register('bar', self::class)
234+
->addArgument('a')
235+
->addMethodCall('setB')
236+
->setDecoratedService('foo')
237+
->addTag('t')
238+
->setInstanceofConditionals(array(
239+
parent::class => (new ChildDefinition(''))->addTag('bar'),
240+
))
241+
;
242+
243+
(new ResolveInstanceofConditionalsPass())->process($container);
244+
245+
$abstract = $container->getDefinition('abstract.instanceof.bar');
246+
247+
$this->assertEmpty($abstract->getArguments());
248+
$this->assertEmpty($abstract->getMethodCalls());
249+
$this->assertNull($abstract->getDecoratedService());
250+
$this->assertEmpty($abstract->getTags());
251+
$this->assertTrue($abstract->isAbstract());
252+
}
227253
}

0 commit comments

Comments
 (0)