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

Fixes #4221 : set shared false for view_helpers should create new instance #6786

Closed

Conversation

samsonasik
Copy link
Contributor

Fixes #4221

@samsonasik samsonasik force-pushed the hotfix/shared-view-helper branch 3 times, most recently from cd46c68 to 6503ba3 Compare October 20, 2014 02:11
@@ -396,7 +396,7 @@ public function __call($method, $argv)
$this->__pluginCache[$method] = $this->plugin($method);
}
if (is_callable($this->__pluginCache[$method])) {
return call_user_func_array($this->__pluginCache[$method], $argv);
return call_user_func_array($this->plugin($method), $argv);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fix the problem partially, and only for callable view helpers.

@Ocramius Ocramius self-assigned this Nov 22, 2014
@samsonasik samsonasik force-pushed the hotfix/shared-view-helper branch from 6503ba3 to 65cc886 Compare November 22, 2014 17:03
@samsonasik
Copy link
Contributor Author

@Ocramius done ;). I've patched the plugin call in __call and killed the __pluginCache

@dkemper
Copy link
Contributor

dkemper commented Nov 28, 2014

I think to kill the cache is correct. I made a version without killing the cache. But it doesn't look right to me.

https://github.com/dkemper/zf2/compare/shared-viewhelper

@samsonasik
Copy link
Contributor Author

I already killed the pluginCache

@Perfect-Web
Copy link

Can we please merge this ? this issue is so annoying

@Ocramius
Copy link
Member

I will merge only in 2.4 though, as there is a behavioural change.

@Ocramius Ocramius added this to the 2.4.0 milestone Nov 29, 2014
Ocramius added a commit that referenced this pull request Dec 5, 2014
Ocramius added a commit that referenced this pull request Dec 5, 2014
@Ocramius
Copy link
Member

Ocramius commented Dec 5, 2014

This was fixed in d3a991f in develop. Thanks @samsonasik!

@Ocramius Ocramius closed this Dec 5, 2014
@samsonasik samsonasik deleted the hotfix/shared-view-helper branch December 5, 2014 22:08
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set shared false for view_helpers doesn't work
4 participants