I can define anonymous inline factory (Symfony 6+) like this:
GuzzleClient1:
class: GuzzleHttp\ClientInterface
factory: [ !service { class: 'App\GuzzleClientFactory', calls: [ { 'withBaseUri': [ 'http://example.com' ] } ] }, 'build' ]
or like this:
GuzzleClient1:
class: GuzzleHttp\ClientInterface
factory:
- !service
class: 'App\GuzzleClientFactory'
calls:
- withBaseUri: ['http://example.com' ]
- 'build'
but I can't figure out the correct syntax for anonymous inline invokable factory. How do I omit method name here?