Dependency injection #2
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Total time spent: 8 hours 14 minutes
Due date
c.fahner
8 hours 14 minutes
No due date set.
Blocks
#1 Request/response flow
slendium/framework
Reference
slendium/framework#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Basic dependency injection.
Open question: how to deal with "optional dependencies" (technically not a dependency anymore... 😅)? It would be nice to not require a database implementation for running a bare bones instance of the framework that displays information from static files, for example. However, the framework should still be able to provide features such as Origin-header checking or user authentication out of the box - both of which typically require some kind of persistent storage.
Regarding the "open question":
Currently the framework will simply provide implementations of its own dependencies in an optional module that is packaged with the framework.
If a project wants to override any of the default framework services they can simply provide a custom resolver in the application configs, which will take priority over any
#[ImplementedBy]attributes.