-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load providers when accessing via
ProviderRegistrar#[]
(#273)
Move the logic from `ProviderRegistrar#find_and_load_provider` straght into `#[]` for a more convenient and reliable experience when interacting with providers. Having `#[]` either return a provider or nil without attempting to _load_ the provider was a potential source of confusion. Now it can work as the one and only interface for fetching a provider. Remove the `#provider` alias for `#[]` since this was private and unused (and unnecessary). Remove `#start_provider_dependency` (which was the only thing in `ProviderRegistrar` dealing with components instead of providers and instead invoke its internal logic (a one-liner, anyway!) directly in `Container#load_component`.
- Loading branch information
Showing
2 changed files
with
10 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters