Feature #324
Add support for "required" dependencies via setter injection
Status: | Resolved | Start date: | 2008-02-19 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Object | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: |
Description
Currently all dependencies injected through autowired setter injection (see #319) are optional.
This should be configurable through a "@required" annotation on the inject* method. If an inject method is marked as required, the object builder would throw an exception if the dependencies can't be resolved. Such an exception would not be thrown for optional dependencies.
Associated revisions
- FLOW3: (Component) Added support for @required setter-injected dependencies. Resolves #324.
- FLOW3: (Documentation) Updated the Component documentation. Added a new section about required and optional dependency injection and about the new "inject*" methods for setter injection with autowiring support.
- PhoneBookTutorial, Testing: Added @required tags where necessary.
- FLOW3: (Reflection) Whitespace fixes
History
#1 Updated by Robert Lemke about 7 years ago
- Target version deleted (
18)