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

feat(dependencyinjection): Allow optional (nullable) services #41265

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Nov 3, 2023

Summary

Allows working with classes that might or might not be available. For safety I chose to only allow this if a constructor argument is typed.

I need this for a cross-app dependency inside of server in #40559.

Checklist

Allows working with classes that might or might not be available.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@ChristophWurst ChristophWurst merged commit b038dbe into master Nov 3, 2023
50 checks passed
@ChristophWurst ChristophWurst deleted the feat/dependencyinjection/optional-services branch November 3, 2023 11:52
@blizzz blizzz mentioned this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
Development

Successfully merging this pull request may close these issues.

4 participants