bug #10686 Fixing Yaml Loader/Dumper to use underscores instead of dashes (WouterJ)
This PR was merged into the 2.5-dev branch.
Discussion
----------
Fixing Yaml Loader/Dumper to use underscores instead of dashes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9ba2861
Fixed Yaml loader/dumper to use underscores
This commit is contained in:
commit
dbf7eeb10f
@ -143,7 +143,7 @@ class YamlDumper extends Dumper
|
||||
list ($decorated, $renamedId) = $decorated;
|
||||
$code .= sprintf(" decorates: %s\n", $decorated);
|
||||
if (null !== $renamedId) {
|
||||
$code .= sprintf(" decoration-inner-name: %s\n", $renamedId);
|
||||
$code .= sprintf(" decoration_inner_name: %s\n", $renamedId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ class YamlFileLoader extends FileLoader
|
||||
}
|
||||
|
||||
if (isset($service['decorates'])) {
|
||||
$renameId = isset($service['decoration-inner-name']) ? $service['decoration-inner-name'] : null;
|
||||
$renameId = isset($service['decoration_inner_name']) ? $service['decoration_inner_name'] : null;
|
||||
$definition->setDecoratedService($service['decorates'], $renameId);
|
||||
}
|
||||
|
||||
|
@ -34,4 +34,4 @@ services:
|
||||
decorates: decorated
|
||||
decorator_service_with_name:
|
||||
decorates: decorated
|
||||
decoration-inner-name: decorated.pif-pouf
|
||||
decoration_inner_name: decorated.pif-pouf
|
||||
|
@ -87,6 +87,6 @@ services:
|
||||
decorator_service_with_name:
|
||||
class: stdClass
|
||||
decorates: decorated
|
||||
decoration-inner-name: decorated.pif-pouf
|
||||
decoration_inner_name: decorated.pif-pouf
|
||||
alias_for_foo: @foo
|
||||
alias_for_alias: @foo
|
||||
|
Reference in New Issue
Block a user