feat: remove ApplicationContext
and replace it with a new interface for DeferredProvider
. #77
Closed
Description
Description
The current interface for DeferredProviders
's init
function is unclear and allow to access providers out of the scope. This can lead to misuse of the contextualized scope resulting in wrong usage.
The function signature should be changed to the following:
(...providers) async {}
The ...providers
are the same providers defined in the inject
property and follow the same order.
If one or more providers of the dependencies is yet to be initialized, then the current initialization is stopped to correctly init all its dependencies.
Requirements
- Change the function signature of the
init
params. - Check for circular dependencies
- Remove the
ApplicationContext
- Update the documentation
- Update the tests
Metadata
Assignees
Projects
Status
Closed