webware / webware-navigation
ACL-aware navigation middleware, container, and Laminas view helper for webware-* packages
Requires
- php: ~8.4.1 || ~8.5.0
- laminas/laminas-view: ^3.0
- mezzio/mezzio-router: ^3.15 || ^4.0
- psr/container: ^2.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- webware/webware-core: ^1.0.0-alpha.6
Requires (Dev)
- infection/infection: ^0.34.1
- laminas/laminas-permissions-acl: ^2.16
- phpbench/phpbench: ^1.7
- phpunit/phpunit: ^13.3.0
- roave/backward-compatibility-check: ^8.21.0
- roave/security-advisories: dev-master
- webware/webware-tools: ^1.0.0-beta.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-26 22:51:27 UTC
README
ACL-aware navigation trees for Mezzio, driven by Route::setOptions().
Documentation
| Document | Contents |
|---|---|
| Overview | Goals, quick start, route options reference |
| Architecture | Design decisions and rationale |
| Component Reference | API docs for every class |
| Extending | Custom renderers, planned RendererPluginManager |
| Testing | Unit test examples and guidance |
Installation
Private package — not published to Packagist. Consume via a VCS repository entry:
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/webinertia/webware-navigation" }
],
"require": {
"webware/webware-navigation": "0.1.x-dev"
}
}
After each change run composer update webware/webware-navigation (the lock
pins the commit hash).
Note: the package types against Webware\Acl\AclInterface and
Webware\UserManager\UserInterface, which the consuming application provides
until webware-acl + webware-usermanager publish — see
docs/webware-tools-alignment.md.
Add to config/config.php:
Webware\Navigation\ConfigProvider::class,
That registers the middleware factory and the navigation view helper. The
middleware itself is not piped for you: add it to config/pipeline.php
after RouteMiddleware and before DispatchMiddleware, so that RouteResult
is on the request by the time it runs:
$app->pipe(RouteMiddleware::class); // ... $app->pipe(UrlHelperMiddleware::class); $app->pipe(NavigationMiddleware::class); $app->pipe(DispatchMiddleware::class);
The package deliberately does not self-register through Mezzio's
middleware_pipeline config. That mechanism orders middleware by an integer
priority, and this middleware's correctness depends on running after
RouteMiddleware and before DispatchMiddleware, an ordering such a priority
cannot express safely. See Architecture, Decision 7.
Namespace
Package: webware/navigation
Namespace: Webware\Navigation\