merged branch palex-fpt/I-7542 (PR #7595)
This PR was merged into the master branch.
Discussion
----------
YamlDumper should dump Definition::$factoryClass setting
It should fix #7542
Commits
-------
77f00d2
YamlDumper should dump Definition::getFactoryClass() setting
This commit is contained in:
commit
c9c687ea41
@ -102,6 +102,10 @@ class YamlDumper extends Dumper
|
||||
$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());
|
||||
}
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user