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

Provide forward compatibility with v3 where functionality is broken #79

Merged
merged 7 commits into from
Jun 30, 2016

Conversation

weierophinney
Copy link
Member

@weierophinney weierophinney commented Jun 30, 2016

Updates zend-view to be forwards compatible with zend-mvc v3.

UrlHelper

The UrlHelper tests were previously using typehints against the zend-mvc v2 router in some locations. This patch provides updates to the test to detect which router version is present, as well as which route classes, so it can test correctly across both router versions.

Navigation helpers

The navigation helper tests were:

  • hardcoding against the v2 RouteMatch
  • not taking into account that route services move to the zend-router package when zend-mvc v3 is present.

They have been updated to resolve this, and now pass against both versions.

FlashMessenger

Updates the FlashMessenger to be forwards compatible with zendframework/zend-mvc-plugin-flashmessenger, while retaining compatibility with zend-mvc 2.7. This required:

  • Removing references to class constants defined in the FlashMessenger MVC plugin; this means temporarily hardcoding the values in the helper, and resulted in a TODO item to re-introduce them for version 3.
  • Removing typehints for the FlashMessenger MVC plugin; when required, we now test against both the v2 and v3 class name to validate.
  • Deprecating the helper for version 3.0.

This PR supercedes #78.

Rockstar04 and others added 4 commits June 29, 2016 09:46
Updates the FlashMessenger to be forwards compatible with
zendframework/zend-mvc-plugin-flashmessenger, while retaining compatibility with
zend-mvc 2.7. This required:

- Removing references to class constants defined in the FlashMessenger MVC
  plugin; this means temporarily hardcoding the values in the helper, and
  resulted in a TODO item to re-introduce them for version 3.
- Removing typehints for the FlashMessenger MVC plugin; when required, we now
  test against both the v2 and v3 class name to validate.
- Deprecating the helper for version 3.0.
@weierophinney weierophinney added this to the 2.8.1 milestone Jun 30, 2016
@weierophinney weierophinney self-assigned this Jun 30, 2016
@weierophinney weierophinney changed the title Allow the FlashMessenger helper to work against both v2 and v3 Provide forward compatibility with v3 where functionality is broken Jun 30, 2016
zend-router is always required, so we need to check for the absence of
v2 routing classes before injecting zend-router configuration.

Similarly, in the `UrlTest`, we need to set the types to test against based on
presence of v2 routing classes, not v3 routing classes.
@weierophinney
Copy link
Member Author

WE HAVE GREEN!!!!

@weierophinney weierophinney removed the WIP label Jun 30, 2016
@weierophinney weierophinney merged commit ffb8473 into zendframework:master Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
@weierophinney weierophinney deleted the hotfix/78 branch June 30, 2016 22:30
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.

2 participants