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

[DependencyInjection] Improve documentation about differences between AutowireIterator and AutowireLocator #20260

Open
etshy opened this issue Sep 26, 2024 · 0 comments
Labels
DependencyInjection hasPR A Pull Request has already been submitted for this issue.

Comments

@etshy
Copy link
Contributor

etshy commented Sep 26, 2024

The doc about these Attributes states

To receive an iterable instead of a service locator, you can switch the AutowireLocator attribute to AutowireIterator attribute.

Though these two Attributes are not "switchable" as-is because AutowireLocator can accept a string (tag) or an array of class (classname or SubscribedService) while AutowireIterator can only accept a string (tag).

If it's intended maybe, the doc should make the difference clear, especially because there is no example of usage of AutowireIterator.
It it's not intended, then the problem lies in DependencyInjection code and AutowireIterator should be able to accept an array of class too.

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DependencyInjection hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

3 participants