Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13b9dc8

Browse filesBrowse files
committed
Fixing a bug where autoconfigure was "lost" if the service had an instanceof
1 parent bc2283a commit 13b9dc8
Copy full SHA for 13b9dc8

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

‎src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ private function doResolveDefinition(ChildDefinition $definition)
170170
// these attributes are always taken from the child
171171
$def->setAbstract($definition->isAbstract());
172172
$def->setTags($definition->getTags());
173+
// autoconfigure is never taken from parent (on purpose)
174+
// and it's not legal on an instanceof
175+
$def->setAutoconfigured($definition->isAutoconfigured());
173176

174177
return $def;
175178
}

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/expected.yml

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/expected.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
class: Symfony\Component\DependencyInjection\Tests\Compiler\IntegrationTestStub
55
# _instanceof overrides _defaults
66
autowire: false
7+
# inherited from _defaults
78
autoconfigure: true
89
# from _instanceof
910
shared: false

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.