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

Use route result observer/subject interfaces from zend-expressive-router #1

Merged

Conversation

weierophinney
Copy link
Member

This patch updates the code to use the RouteResultObserverInterface from zend-expressive-router 1.1.0, vs the one in zend-expressive (as yet unreleased). The change allows the following:

  • Fewer dependencies (zend-expressive-router vs zend-expressive + zend-expressive-router + zend-expressive-template)
  • No circular dependencies
  • Simpler test (mock zend-expressive-router's RouteResultSubjectInterface instead of zend-expressive's Application class)

This keeps all functionality, making it backwards compatible with 1.0.

Instead of zend-expressive. Currently, zend-expressive-router now contains all
interfaces against which this component codes against, even for testing.
…sive-router

Updates `UrlHelper` to use the `RouteResultObserverInterface` from the
zend-expressive-router package instead of from the zend-expressive package.
Additionally, updates the `UrlHelperFactory` tests to generate a mock of
`RouteResultSubjectInterface` to use for testing the "Application" injection.

The tests still specify `Zend\Expressive\Application` in the import statements
and when specifying names to the container mock instance. This works, even
without the class, due to the fact that PHP resolves the `::class` constant
based on the import statements when not operating on an instance.
@weierophinney weierophinney added this to the 1.1.0 milestone Dec 6, 2015
@weierophinney weierophinney self-assigned this Dec 6, 2015
@weierophinney weierophinney merged commit fbae729 into zendframework:master Dec 6, 2015
weierophinney added a commit that referenced this pull request Dec 6, 2015
weierophinney added a commit that referenced this pull request Dec 6, 2015
@weierophinney weierophinney deleted the feature/reduce-deps branch December 6, 2015 21:22
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.

1 participant