Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

YamlDumper should dump Definition::getFactoryClass() setting

  • Loading branch information...
commit 77f00d263a9c4f83d1eda6f291cb69e690aa962e 1 parent 83e078a
Alexey Prilipko authored
View
4 src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
@@ -102,6 +102,10 @@ private function addService($id, $definition)
$code .= sprintf(" synchronized: true\n");
}
+ if ($definition->getFactoryClass()) {
+ $code .= sprintf(" factory_class: %s\n", $definition->getFactoryClass());
+ }
+
if ($definition->getFactoryMethod()) {
$code .= sprintf(" factory_method: %s\n", $definition->getFactoryMethod());
}
View
2  src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml
@@ -9,6 +9,7 @@ services:
tags:
- { name: foo, foo: foo }
- { name: foo, bar: bar }
+ factory_class: FooClass
factory_method: getInstance
arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container']
properties: { foo: bar, moo: '@foo.baz' }
@@ -23,6 +24,7 @@ services:
configurator: ['@foo.baz', configure]
foo.baz:
class: %baz_class%
+ factory_class: %baz_class%
factory_method: getInstance
configurator: ['%baz_class%', configureStatic1]
foo_bar:
Please sign in to comment.
Something went wrong with that request. Please try again.