If you're using the default services.yaml configuration both classes are automatically registered as services and configured to be autowired. This means you can use them immediately without any configuration.
However, to understand autowiring better, the following examples explicitly configure both services:
# config/services.yaml
services:
_defaults:
autowire: true
App.Service.TwitterClient:
# redundant thanks to _defaults, but value is overridable on each service
autowire: false
arguments:
- @App.Twitter
If you're using the default services.yaml configuration both classes are automatically registered as services and configured to be autowired. This means you can use them immediately without any configuration.
However, to understand autowiring better, the following examples explicitly configure both services: