fix missing comma in YamlDumper

This commit is contained in:
Massimiliano Arione 2015-01-11 18:40:41 +01:00
parent 76de7006d5
commit f600d1a557
4 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ class YamlDumper extends Dumper
foreach ($attributes as $key => $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);
}

View File

@ -11,7 +11,7 @@ $container = new ContainerBuilder();
$container->
register('foo', 'FooClass')->
addTag('foo', array('foo' => 'foo'))->
addTag('foo', array('bar' => 'bar'))->
addTag('foo', array('bar' => 'bar', 'baz' => 'baz'))->
setFactoryClass('FooClass')->
setFactoryMethod('getInstance')->
setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container')))->

View File

@ -8,7 +8,7 @@
<services>
<service id="foo" class="FooClass" factory-method="getInstance" factory-class="FooClass">
<tag name="foo" foo="foo"/>
<tag name="foo" bar="bar"/>
<tag name="foo" bar="bar" baz="baz"/>
<argument>foo</argument>
<argument type="service" id="foo.baz"/>
<argument type="collection">

View File

@ -8,7 +8,7 @@ services:
class: FooClass
tags:
- { name: foo, foo: foo }
- { name: foo, bar: bar }
- { name: foo, bar: bar, baz: baz }
factory_class: FooClass
factory_method: getInstance
arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container']