dependency-injection
Installation
SKILL.md
Slim Dependency Injection
When to use
- The user needs to register service definitions in the Slim container so classes get their dependencies.
- The user wants Slim to resolve an invokable controller class from the container instead of a closure.
- The user wants to configure a PSR-11 container for a Slim app via AppFactory::setContainer.
When NOT to use
- Do not reach for this skill to pull services out of the container inside handlers on demand; that is a service-locator anti-pattern, not injection.
- Do not introduce a container for a trivial Slim app with a couple of routes and no shared services.