Search by

webware / webware-navigation

tyrsson

ACL-aware navigation middleware, container, and Laminas view helper for webware-* packages

Package info

github.com/webinertia/webware-navigation

pkg:composer/webware/webware-navigation

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0-alpha.2 2026-09-25 02:47 UTC

This package is auto-updated.

Last update: 2026-09-26 22:51:27 UTC


README

PHP Version Latest Version License Continuous Integration codecov Mutation testing badge

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\