Remove double injection in Plugin Controller Manager #3662

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@blanchonvincent
Contributor

Injection is in the constructor with the initializer

@blanchonvincent blanchonvincent Remove double injection
Injection is in the constructor with the initializer
ef777e7
@weierophinney
Member

The docblock you removed gives the reason for the injection - in case
another controller on the the same request retrieves the same plugin.

I'd argue we remove the one passed to the constructor.

Also: this patch has a lot of small white space changes that are unrelated,
which makes it difficult to find the change you propose. Can you reduce it
to only the nescessary changes, please?

On Monday, February 4, 2013, Blanchon Vincent wrote:

Injection is in the constructor with the initializer

You can merge this Pull Request by running

git pull https://github.com/blanchonvincent/zf2 hotfix/remove-double-injection-controller-plugin

Or view, comment on, or merge it at:

#3662
Commit Summary

  • Remove double injection

File Changes

  • M library/Zend/Mvc/Controller/PluginManager.phphttps://github.com/zendframework/zf2/pull/3662/files#diff-0(28)

Patch Links:

Matthew Weier O'Phinney
matthew@weierophinney.net
http://mwop.net/

@blanchonvincent
Contributor

@weierophinney I remove the initializer in the constructor

@samsonasik samsonasik commented on the diff Feb 4, 2013
library/Zend/Mvc/Controller/PluginManager.php
@@ -60,7 +60,7 @@ class PluginManager extends AbstractPluginManager
* After invoking parent constructor, add an initializer to inject the
* attached controller, if any, to the currently requested plugin.
*
- * @param null|ConfigInterface $configuration
+ * @param null|ConfigInterface $configuration
@samsonasik
samsonasik Feb 4, 2013 Contributor

double space after @param , already correct before .

@weierophinney weierophinney was assigned Feb 5, 2013
@weierophinney weierophinney added a commit that referenced this pull request Feb 5, 2013
@weierophinney weierophinney Merge branch 'hotfix/3662' into develop
Forward port #3662
748747b
@weierophinney weierophinney added a commit that closed this pull request Feb 5, 2013
@weierophinney weierophinney Merge branch 'hotfix/3662'
Close #3662
64d85ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment