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

Url factory does not work starting in 2.6 #71

Merged
merged 3 commits into from
Feb 22, 2016

Conversation

weierophinney
Copy link
Member

Per zendframework/zend-view#51, the url factory created in Zend\Mvc\Service\ViewHelperManagerFaactory no longer works as expected. The reason is because url now exists as an alias in the zend-view HelperPluginManager, and aliases are resolved prior to attempting to pull the service.

As such, the ViewHelperManagerFactory needs to register the factory under the FQCN (as well as a normalized version of the FQCN) in order for it to be invoked (or it needs to override the alias).

This also affects the basepath and doctype helpers.

@weierophinney weierophinney self-assigned this Feb 22, 2016
@weierophinney weierophinney added this to the 2.6.2 milestone Feb 22, 2016
This patch implements tests for each of the url, basepath, and doctype
helpers, ensuring that the factory is invoked and the helper returned
properly configured *for each alias* we define, as well as for the fully
qualifed class name.

Interestingly, while the basepath and doctype tests fail for every case,
the URL helper only fails for the case of a fully qualified name; I'm
hoping this will still work as a fix.

I've refactored the `ViewHelperManagerFactory` substantially using the
extract method refactor to extract:

- helper factories (these are returned by dedicated methods now)
- helper factory registration
- helper configuration from other components

In the case of the second bullet point, I am now registering the plugins
using the FQCN as well as the normalized version of it, and not the
aliases; the aliases will resolve to the factory name.
@weierophinney weierophinney merged commit facef82 into zendframework:master Feb 22, 2016
weierophinney added a commit that referenced this pull request Feb 22, 2016
weierophinney added a commit that referenced this pull request Feb 22, 2016
weierophinney added a commit that referenced this pull request Feb 22, 2016
@weierophinney weierophinney deleted the hotfix/71 branch February 22, 2016 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant