Re-Enable SimpleInjector bindings validation
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my request.
### Is Your Feature Request Related To A Problem? Please describe.
When the project files where updated to make use of the VS2017 csproj structure, there were a need to also update SimpleInjector, the behaviour of the SimpleInjector we needed to update to throws exceptions related to life cycles being invalid, and we had to disable this verification system to be able to continue (changing the lifecycle could have breaking changes, so this weren't done).
### Describe The Solution. Why is it needed?
We need to investigate and update the lifecycle used when registering dependencies to be proper for SimpleInjector, so that we are able to continue with having SimpleInjector validate the bindings.
### User Story
As a maintainer of the application, I would like us to validate/ensure that we are registering dependencies properly, so that we can ensure that there won't be any surprises happening when resolving items during runtime.
### Additional Context
This is not directly related to something a user would see (most likely), but rather to the maintenance of the application and that we ensures that we are doing the _correct_ things when it comes to registering dependencies.
### Acceptance Criteria
- [ ] Investigate what is needed to re-enable IoC validation
- [ ] Update Lifetimes for dependencies with invalid lifetimes
- [ ] Run all unit/integration and e2e tests to verify no behaviour changes
### Related Issues
_No response_
Contributor guide
Research direction
Start by locating the SimpleInjector registration and the currently disabled IoC validation. Investigate which dependency lifetimes fail validation, update the invalid registrations, then run the unit, integration, and end-to-end test suites to verify there are no behavior changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100