I have some service definition that looks like this:
MyService:
class: Some\Class\Here
factory:
- SomeFactoryHere
- method
calls:
- [add, ["@=service('AnotherService1').create(service('AnotherService2'), service('AnotherService3'), service('AnotherService3'))"]]
IMHO, this can be more readable if converted to something like this:
MyService:
class: Some\Class\Here
factory:
- SomeFactoryHere
- method
calls:
-
add,
"@=service('AnotherService1').create(
service('AnotherService2'),
service('AnotherService3'),
service('AnotherService3')
)"
But, this is not valid YAML (Symfony parser fails), and my question is how this config can be converted to something like above?
UPD#1
Look at Symfony YAML format conversion: "calls" with string params - important nuances are there.