Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Use default values for type-hinted arguments if type not found in container #243

Conversation

weierophinney
Copy link
Member

Per #239, currently when an argument is type-hinted but has a default value (typically null), the factory raises an exception about not being able to retrieve the value from the container. In such cases, we can use the default value for the argument during injection.

Fixes #239.

…tainer

Per zendframework#239, currently when an argument is type-hinted but has a default
value (typically `null`), the factory raises an exception about not
being able to retrieve the value from the container. In such cases, we
can use the default value for the argument during injection.
@weierophinney weierophinney merged commit 5108bca into zendframework:master Jan 29, 2018
weierophinney added a commit that referenced this pull request Jan 29, 2018
weierophinney added a commit that referenced this pull request Jan 29, 2018
weierophinney added a commit that referenced this pull request Jan 29, 2018
@weierophinney weierophinney deleted the hotfix/239-reflection-factory-default-values branch January 29, 2018 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant