Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DI] Add "defaults" tag to XML services configuration
- Loading branch information
1 parent
7b4a18b
commit 05f24d5
Showing
5 changed files
with
149 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services29.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<defaults public="false" autowire="true"> | ||
<tag name="foo" /> | ||
</defaults> | ||
|
||
<service id="with_defaults" class="Foo" /> | ||
<service id="no_defaults" class="Foo" public="true" autowire="false"> | ||
<tag name="bar" /> | ||
</service> | ||
<service id="no_defaults_child" class="Foo" parent="no_defaults"> | ||
<tag name="bar" /> | ||
</service> | ||
<service id="with_defaults_child" class="Foo" parent="with_defaults" /> | ||
</services> | ||
</container> |
17 changes: 17 additions & 0 deletions
17
src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services30.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<defaults public="false"> | ||
<autowire>__construct</autowire> | ||
</defaults> | ||
|
||
<service id="with_defaults" class="Foo" /> | ||
<service id="no_defaults" class="Foo" public="true"> | ||
<autowire>setFoo</autowire> | ||
</service> | ||
<service id="no_defaults_child" class="Foo" parent="no_defaults"> | ||
<autowire>setFoo</autowire> | ||
</service> | ||
<service id="with_defaults_child" class="Foo" parent="with_defaults" /> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters