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

Resolve callable dependencies #12

Merged
merged 3 commits into from
May 18, 2023
Merged

Conversation

Chemaclass
Copy link
Member

📚 Description

Currently, the resolveDependencies() works only for class-string, but not for callable/anon-functions.

🔖 Changes

  • Allow using Closures to work with resolveDependencies() as well, so you can pass a class name or directly a callable, and it will resolve the dependencies the same way as it would do it with the class injecting them via the constructor, and in the case of a Closure, as normal arguments.

@Chemaclass Chemaclass added the enhancement New feature or request label May 18, 2023
@Chemaclass Chemaclass self-assigned this May 18, 2023
Copy link
Member

@JesusValera JesusValera left a comment

Choose a reason for hiding this comment

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

Nice one!!

@Chemaclass Chemaclass merged commit 08d8b4a into main May 18, 2023
@Chemaclass Chemaclass deleted the resolve-callable-dependencies branch May 18, 2023 17:02
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants