Skip to content

[DependencyInjection] Add docs for SubscribedService::$attributes #17211

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

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

kbond
Copy link
Member

@kbond kbond commented Aug 19, 2022

Fixes #17208.

@kbond
Copy link
Member Author

kbond commented Aug 19, 2022

One potential problem with this feature is it will require the latest version of symfony/service-contracts (3.2+) but symfony/dependency-injection currently allows older versions.

Basically, a user could have symfony/dependency-injection 6.2 but symfony/service-contracts 3.1. This feature will not work in this case.

@kbond kbond force-pushed the service-subscriber-attributes branch from bc1382f to b6aa127 Compare August 19, 2022 15:40
@mdoutreluingne
Copy link
Contributor

I think it would be interesting here to mention that this feature requires symfony/service-contracts (3.2+), because in your example there may be a case where this feature would not work depending on the version of symfony/service-contracts.

@javiereguiluz
Copy link
Member

Thanks Kevin! Maxime, I added that note to both examples while merging (see 1aa135c).

@kbond kbond deleted the service-subscriber-attributes branch September 21, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DependencyInjection] Allow service subscribers to return `SubscribedSe…
4 participants