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

Fix the module initializer #65

Merged

Conversation

weierophinney
Copy link
Member

Initializers actually receive the module manager itself, not the module event. As such, we have to pull the event from the module manager instance.

Initializers actually receive the module manager itself, not the module
event. As such, we have to pull the event from the module manager
instance.
@weierophinney weierophinney added this to the 2.7.2 milestone Apr 18, 2016
@weierophinney weierophinney self-assigned this Apr 18, 2016
* @return void
*/
public function init($event)
public function init($moduleManager)
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to typehint the parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

Potentially. We've typically not done it, in order to prevent the inevitable "zend-modulemanager should be listed as a package requirement" issues. For some reason, not using a typehint doesn't trigger those remarks, even though the code ends up working exactly the same.

@weierophinney weierophinney merged commit c9f8b65 into zendframework:master Apr 18, 2016
weierophinney added a commit that referenced this pull request Apr 18, 2016
weierophinney added a commit that referenced this pull request Apr 18, 2016
weierophinney added a commit that referenced this pull request Apr 18, 2016
@weierophinney weierophinney deleted the hotfix/initializer branch April 18, 2016 17:31
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants