Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect the ContainerInterface::get contract for NULL_ON_INVALID_REFERENCE and not return FALSE #16

Merged
merged 10 commits into from
Dec 3, 2014
Merged

Conversation

dawehner
Copy link
Collaborator

@dawehner dawehner commented Dec 3, 2014

Based upon #11

Fixes #15

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling d73025f on dawehner:container-get-null into e950cc9 on LionsAd:7.x-1.x.

* Don't look up the service twice, but also throw an exception if the second call
  specifies EXCEPTION_ON_REFERENCE.
@dawehner
Copy link
Collaborator Author

dawehner commented Dec 3, 2014

Found another case:

  • First call with NULL_ON_INVALID_REFERENCE
  • Second call: EXCEPTION_ON_INVALID_REFERENCE

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling c521068 on dawehner:container-get-null into e950cc9 on LionsAd:7.x-1.x.

@LionsAd
Copy link
Owner

LionsAd commented Dec 3, 2014

Nice one!

@LionsAd
Copy link
Owner

LionsAd commented Dec 3, 2014

RTBM

LionsAd added a commit that referenced this pull request Dec 3, 2014
Respect the ContainerInterface::get contract for NULL_ON_INVALID_REFERENCE and not return FALSE
@LionsAd LionsAd merged commit 6e2370f into LionsAd:7.x-1.x Dec 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix return value of ->get() to be NULL when asking for NULL on invalid instead of FALSE
3 participants