Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to override services from autowire #213

Closed
zazoomauro opened this issue Aug 21, 2024 · 0 comments
Closed

Ability to override services from autowire #213

zazoomauro opened this issue Aug 21, 2024 · 0 comments
Assignees
Milestone

Comments

@zazoomauro
Copy link
Owner

zazoomauro commented Aug 21, 2024

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
@zazoomauro zazoomauro added this to the 3.0 milestone Aug 21, 2024
@zazoomauro zazoomauro self-assigned this Aug 21, 2024
@zazoomauro zazoomauro changed the title Abilty to override services from autowire Ability to override services from autowire Sep 17, 2024
zazoomauro added a commit that referenced this issue Sep 27, 2024
feat: ✨ Ability to override services from autowire #213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant