co-stack/dependency-injection-additions
Awesome additions for symfony/dependency-injection
Maintainers
Package info
gitlab.com/co-stack.com/co-stack.com/php-packages/dependency-injection-additions
pkg:composer/co-stack/dependency-injection-additions
Requires
- php: ^8.2
- symfony/dependency-injection: ^v7.0 || ^v8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
GPL-3.0+ 8809a62215b2aa4479f68fb470176f030d35868c
- Oliver Eglseder <oliver.eglseder.woop@co-stack.com>
README
About
This package contains awesome, ready-to-use, out-of-the-box, features built on top of symfony/dependency-injection. These features extend the default feature set of the DI container.
Features
InjectionAware
Implement the interface \CoStack\DependencyInjectionAdditions\InjectionAware\InjectionAware. The method __injected
will be called automatically after all dependencies were injected.
When using __construct to initialize an object, only constructor injections are available. With __injected, all
dependencies were injected (constructor, property, method) and are available.
This effectively allows ditching the constructor injection.
