Fix for broken handling of Zend\ServiceManager\ServiceManager::shareByDefault = false (Issue #3408) #3409

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

tux-rampage commented Jan 11, 2013

Changed check for $this->shareByDefault() in
Zend\ServiceManager\ServiceManager::get() to allow shared
instances that are explicitly defined as shared when shareByDefault is
set to false.

This resolves issue #3408

[+BUGFIX] Fixed shareByDefault check
Changed check for $this->shareByDefault() in
Zend\ServiceManager\ServiceManager::get() to allow shared
instances that are explicitly defined as shared when shareByDefault is
set to false.

Resolves #3408
Owner

weierophinney commented Jan 14, 2013

Please add a unit test to verify the change (and prevent future regressions). Thanks!

[~TASK] Unit test for shareByDefault = false
Implemented Unit test for testing correct ServiceManager behavior with 
shareByDefault set to false.

Resolves: #3408, #3409
Contributor

tux-rampage commented Jan 15, 2013

Hi Matthew,

I added the unit test as requested. Please check if this is ok for a pull now.

Thanks

Member

Ocramius commented Jan 16, 2013

@netiul is this what you were referring to when you were talking about the shared flag on a service?

Contributor

tux-rampage commented Jan 16, 2013

@Ocramius Yes, this seems to address the same issue as #3439

@ghost ghost assigned weierophinney Jan 21, 2013

weierophinney added a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment