Closed froschdesign closed 6 years ago
dependencies.global.php
'dependencies' => [
'factories' => [
Zend\Navigation\Navigation::class =>
Zend\Navigation\Service\ExpressiveNavigationFactory::class,
],
'delegators' => [
Zend\View\HelperPluginManager::class => [
Zend\Navigation\View\ViewHelperManagerDelegatorFactory::class,
],
],
'factories' => [
Zend\Navigation\Middleware\NavigationMiddleware::class =>
Zend\Navigation\Middleware\NavigationMiddlewareFactory::class,
],
],
pipeline.php
$app->pipeRoutingMiddleware();
// …
$app->pipe(Zend\Navigation\Middleware\NavigationMiddleware::class);
// …
$app->pipeDispatchMiddleware();
dependencies.global.php
'dependencies' => [
'abstract_factories' => [
Zend\Navigation\Service\ExpressiveNavigationAbstractServiceFactory::class,
],
],
Do not use the ConfigProvider
class, because at the moment the ConfigProvider
only includes the configuration for zend-mvc-based applications!
@webimpress Can you look at the Middleware? Thanks!
ping @weierophinney
@froschdesign Just FYI: I rebased your branch based on current develop.
@weierophinney
For the first 3 comments: I will add new commits.
I'm wondering if this functionality should be in this component, or a bridge component (e.g., zend-expressive-navigation).
I had the same thoughts and I think that is the right way.
We could even eventually move the zend-mvc-specific functionality into its own package.
zend-navigation had no refactoring from ZF1 to ZF2 like zend-form. The view helper are still present in the zend-view component and all problems from version 1 were also included in version 2. The next version would be 2.9, followed by 3.0. I don't know if these extra page types really needed – as example.
I really like the idea of extracting the MVC and the Expressive part from Zend\Ņavigation
in separated bridge components. But that should really be done with the version 3 of Zend\Ņavigation
. Currently I cannot use Zend\Ņavigation
with Zend\Expressive
at all, so I would prefer a 2.x version to get me and others started to use Zend\Ņavigation
with Zend\Expressive
.
:+1:
@weierophinney @RalfEggert
My suggestion for a release:
Later than:
:+1:
We can even split out zend-mvc-navigation early, and have it include the Page\Mvc
class and all zend-view helpers; if it is registered later than zend-navigation and zend-view in the list of modules, then its own configuration takes precedence.
This would then also allow a 2.X version of zend-navigation to require that particular package in order to keep BC. v3 would remove it as a requirement altogether, and instead make it a suggestion. Similarly, a new 2.X version of zend-view could do the same to ensure we have the navigation helpers available, and v3 would make the package a suggestion instead of a requirement.
@froschdesign If you want to create a new repo extracting the new functionality, I can review and fork it into the zendframework organization when it's ready, and add it to packagist at that time.
@weierophinney
We can even split out zend-mvc-navigation early, and have it include the Page\Mvc class and all zend-view helpers
The view helpers in zend-mvc-navigation?!
The view helpers in zend-mvc-navigation?!
Indeed! It's where they really belong. 😀
Indeed! It's where they really belong.
And if I will use zend-expressive, then I must also install Page\Mvc
?
How does it go on?
@froschdesign — sorry for the late response:
And if I will use zend-expressive, then I must also install Page\Mvc?
For now, yes, to retain backwards compatibility. However, for a next major version of this component, we would not need to install the zend-mvc integration package.
@froschdesign I recall you saying you had done the work of separating at least the Expressive support, but I cannot recall where; could you direct me there?
@weierophinney Maybe I misunderstood something, but I think these statements collide:
The view helpers in zend-mvc-navigation?!
Indeed! It's where they really belong.
vs.
However, for a next major version of this component, we would not need to install the zend-mvc integration package.
ping @weierophinney
Can we clarify the problem / question from my last comment? Thanks!
@froschdesign —
My idea is this:
Zend\Navigation\Page\Mvc
class and Zend\Navigation\View
subnamespace. Mark it as conflicting with the zend-navigation v2 series (via the composer.json
conflicts
configuration section)."zendframework/zend-navigation": "^2.9 || ^3.0"
).Make sense?
@weierophinney
Make sense?
Sorry, not really. If I understand correctly and we will create all these packages, for a zend-expressive application I must install zend-expressive-navigation and zend-mvc-navigation?! (zend-mvc-navigation contains the view helpers a.k.a. Zend\Navigation\View
)
Sorry, not really. If I understand correctly and we will create all these packages, for a zend-expressive application I must install zend-expressive-navigation and zend-mvc-navigation?! (zend-mvc-navigation contains the view helpers a.k.a. Zend\Navigation\View)
Okay, that means three packages, then:
Mvc
page typeExpressive users would install zend-navigation and zend-expressive-navigation, and, optionally, zend-view-navigation (depending on their template renderer). zend-mvc users would install zend-navigation, zend-mvc-navigation, and zend-view-navigation.
How does it go on here? We would like to use this feature ...
@mano87
How does it go on here?
Still work in progress. (I have to solve another problem before that.)
We would like to use this feature ...
You can already use this branch: https://github.com/froschdesign/zend-navigation/tree/feature/expressive-support
@all Thanks for your patience!
@froschdesign Thank you for your commitment so far! Is a new zend-navigation release with expressive (3) support planned yet?
@throny
Is a new zend-navigation release with expressive (3) support planned yet?
I hope, but at the moment the priority for the documentation is higher. (see: https://github.com/zendframework/zf-mkdoc-theme/pull/34 – this will help all components!)
Hello,
a long time has gone without any (visible) progress! Is there any chance to get this working and released anytime?
Cheers
@lowtower
a long time has gone without any (visible) progress!
This PR will not be the solution. We will create a separate package / repository for the expressive support and another one for zend-view. Please have a look at: https://github.com/froschdesign/zend-expressive-navigation
Is there any chance to get this working and released anytime?
The current plan includes an alpha version of zend-navigation-zendview, which can be used with zend-expressive-navigation to output all kind of navigations. When? At the moment I'm still on vacation.
But you can test the current version of zend-expressive-navigation and leave some comments in the issue tracker. Thanks!
Added a quick-and-dirty quick start to the new component:
https://github.com/froschdesign/zend-expressive-navigation/issues/2
Closing in favour of froschdesign/zend-expressive-navigation (WIP)
This proposal does not change existing classes of the component, because I wanted an implementation for version 2 of zend-navigation.
ping @weierophinney @RalfEggert @webimpress