Use Scoped services more (and Transient services less) in app-lib? #751
Labels
kind/chore
status/draft
Status: When you create an issue before you have enough info to properly describe the issue.
status/triage
Milestone
Description
Singleton services is perceived by developers as more efficient, because they don't need to be initialised for every request.
The big drawback is that transient service dependencies inherit their singleton scope, which is really bad if someone in a transient dependent service decide to store user data in a class variable causing it to be reused cross request. If service scope validation is configured, we get an exception when a singleton service references a scoped service, making these kind of issues way more obvious, if we used scoped services more.
Additional Information
No response
Tasks
No response
Acceptance Criterias
No response
The text was updated successfully, but these errors were encountered: