minor #21615 [DI][FrameworkBundle] ServiceLocator: fix XmlDescriptor to use dashes (ogizanagi)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][FrameworkBundle] ServiceLocator: fix XmlDescriptor to use dashes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21600#discussion_r101126540
| License       | MIT
| Doc PR        | N/A

As reported by @stof, I should have used dashes, not underscores. My bad...

Commits
-------

1417f112a7 [DI][FrameworkBundle] ServiceLocator: fix XML descriptor to use dashes
This commit is contained in:
Fabien Potencier 2017-02-16 04:32:11 -08:00
commit a70ee67a88
3 changed files with 3 additions and 3 deletions

View File

@ -437,7 +437,7 @@ class XmlDescriptor extends Descriptor
$argumentXML->appendChild($childArgumentXML);
}
} elseif ($argument instanceof ServiceLocatorArgument) {
$argumentXML->setAttribute('type', 'service_locator');
$argumentXML->setAttribute('type', 'service-locator');
foreach ($this->getArgumentNodes($argument->getValues(), $dom) as $childArgumentXML) {
$argumentXML->appendChild($childArgumentXML);

View File

@ -24,7 +24,7 @@
<argument type="service" id="definition_2"/>
</argument>
<argument type="closure-proxy" id="definition1" method="get"/>
<argument type="service_locator">
<argument type="service-locator">
<argument key="def1" type="service" id="definition_1"/>
<argument key="def2" type="service" id="definition_2"/>
</argument>

View File

@ -21,7 +21,7 @@
<argument type="service" id="definition_2"/>
</argument>
<argument type="closure-proxy" id="definition1" method="get"/>
<argument type="service_locator">
<argument type="service-locator">
<argument key="def1" type="service" id="definition_1"/>
<argument key="def2" type="service" id="definition_2"/>
</argument>