-
Notifications
You must be signed in to change notification settings - Fork 436
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
[bundle] Renamed exposed services' name to classes' FQCN #242
Conversation
doesn't it contradicts to https://symfony.com/doc/current/service_container/autowiring.html#public-and-reusable-bundles? |
No. It means that bundles should configure themselves their internal and exposed services. Here, those new aliases are meant to allow users of Enqueue to autowire Enqueue's bundle's services into their own classes in a Symfony app. |
So the bundle may contain autowiring declarations but it shouldn't use them itself, right? |
Yep. Anyway, by declaring our services with their arguments in a config file as it is done actually, this bundle don't use autowiring actually. But by not exposing the public services by their FQCN, they could not be autowired by Symfony 4 in users' services. |
An alternative could be to deprecate all |
I was thinking as something like this : services:
Enqueue\Client\Producer:
class: 'Enqueue\Client\Producer'
arguments:
- '@enqueue.client.driver'
- '@enqueue.client.rpc_factory'
- '@enqueue.client.extensions'
enqueue.client.producer:
deprecated: The "%service_id%" service is deprecated since 0.9 and will be removed in 1.0. Use "Enqueue\Client\Producer" instead.
alias: Enqueue\Client\Producer But it looks like it's not supported by Symfony sadly (symfony/symfony#24507). |
looks good. let's do it. The message should be: |
We could go without depreciation notice. I am fine with it. Leave there a yaml comment there. |
@makasim If tests are green, it's ready to be reviewed. |
@Lctrs still red |
Yep saw it. Lowercased services identifiers in Symfony < 3.3 is annoying. I don't have time today to work on it. I'll try to fix it by monday. |
@makasim Failures are unrelated. |
[bundle] Renamed exposed services' name to classes' FQCN
No description provided.