fix missing comma in YamlDumper
This commit is contained in:
parent
76de7006d5
commit
f600d1a557
@ -85,7 +85,7 @@ class YamlDumper extends Dumper
|
|||||||
foreach ($attributes as $key => $value) {
|
foreach ($attributes as $key => $value) {
|
||||||
$att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value));
|
$att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value));
|
||||||
}
|
}
|
||||||
$att = $att ? ', '.implode(' ', $att) : '';
|
$att = $att ? ', '.implode(', ', $att) : '';
|
||||||
|
|
||||||
$tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att);
|
$tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ $container = new ContainerBuilder();
|
|||||||
$container->
|
$container->
|
||||||
register('foo', 'FooClass')->
|
register('foo', 'FooClass')->
|
||||||
addTag('foo', array('foo' => 'foo'))->
|
addTag('foo', array('foo' => 'foo'))->
|
||||||
addTag('foo', array('bar' => 'bar'))->
|
addTag('foo', array('bar' => 'bar', 'baz' => 'baz'))->
|
||||||
setFactoryClass('FooClass')->
|
setFactoryClass('FooClass')->
|
||||||
setFactoryMethod('getInstance')->
|
setFactoryMethod('getInstance')->
|
||||||
setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container')))->
|
setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container')))->
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<services>
|
<services>
|
||||||
<service id="foo" class="FooClass" factory-method="getInstance" factory-class="FooClass">
|
<service id="foo" class="FooClass" factory-method="getInstance" factory-class="FooClass">
|
||||||
<tag name="foo" foo="foo"/>
|
<tag name="foo" foo="foo"/>
|
||||||
<tag name="foo" bar="bar"/>
|
<tag name="foo" bar="bar" baz="baz"/>
|
||||||
<argument>foo</argument>
|
<argument>foo</argument>
|
||||||
<argument type="service" id="foo.baz"/>
|
<argument type="service" id="foo.baz"/>
|
||||||
<argument type="collection">
|
<argument type="collection">
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
class: FooClass
|
class: FooClass
|
||||||
tags:
|
tags:
|
||||||
- { name: foo, foo: foo }
|
- { name: foo, foo: foo }
|
||||||
- { name: foo, bar: bar }
|
- { name: foo, bar: bar, baz: baz }
|
||||||
factory_class: FooClass
|
factory_class: FooClass
|
||||||
factory_method: getInstance
|
factory_method: getInstance
|
||||||
arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container']
|
arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container']
|
||||||
|
Reference in New Issue
Block a user