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

Prepare for RouteResultObserver updates #25

Conversation

weierophinney
Copy link
Member

As of zendframework/zend-expressive#200, a new interface, Zend\Expressive\Router\RouteResultObserverInterface exists to allow notifying instances of the calculated RouteResult; this is particularly of interest to URI generators.

With zendframework/zend-expressive-zendviewrenderer#9, the zend-view integration provides an observer via the UrlHelper it ships, and allows you to attach it to the application via a delegator factory.

This patch defines the delegator factory in the template configuration for zend-view, and also details how you would accomplish similar functionality with Pimple.

As of zendframework/zend-expressive#200, a new interface,
`Zend\Expressive\Router\RouteResultObserverInterface` exists to allow notifying
instances of the calculated `RouteResult`; this is particularly of interest to
URI generators.

With zendframework/zend-expressive-zendviewrenderer#9, the zend-view integration
provides an observer via the `UrlHelper` it ships, and allows you to attach it
to the application via a delegator factory.

This patch defines the delegator factory in the template configuration for
zend-view, and also details how you would accomplish similar functionality with
Pimple.
- Added PHP at `^5.5 || ^7.0`
- Modified expressive to `~1.0.0-dev@dev`
Most to `^0.3`, but used `^0.3.1` for zendviewrenderer, as that has a
fix specific to the latest changes on expressive.
@weierophinney
Copy link
Member Author

I also performed integration tests, using:

Component combination Status
  • zendframework/zend-expressive-aurarouter
  • zendframework/zend-servicemanager
  • zendframework/zend-expressive-platesrenderer
  • Works
  • zendframework/zend-expressive-zendrouter
  • zendframework/zend-servicemanager
  • zendframework/zend-expressive-zendviewrenderer
  • Works
  • zendframework/zend-expressive-fastroute
  • zendframework/zend-servicemanager
  • zendframework/zend-expressive-twigrenderer
  • Not working

    The latter is an issue with the TwigRenderer:

    Argument 1 passed to Zend\Expressive\Twig\TwigRendererFactory::mergeConfig() must be of the type array, object given

    I'm going to see if I can resolve that in the twigrenderer package, so I can specify a working version of that package in the configuration before merging this.

    - ensures a usable version
    @weierophinney weierophinney merged commit d1f3e31 into zendframework:master Dec 3, 2015
    weierophinney added a commit that referenced this pull request Dec 3, 2015
    weierophinney added a commit that referenced this pull request Dec 3, 2015
    @weierophinney weierophinney deleted the feature/zendviewrenderer-delegator branch December 3, 2015 18:37
    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