webware / webware-htmx
Provides HTMX support via laminas-view to webware applications.
0.1.x-dev
2026-08-24 23:24 UTC
Requires
- php: ~8.4.1 || ~8.5.0
- laminas/laminas-diactoros: ^3.8
- laminas/laminas-view: ^3.0
- mezzio/mezzio: ^3.26
- mezzio/mezzio-laminasviewrenderer: ^3.0
- mezzio/mezzio-template: ^2.8 || ^3.0
- psr/container: ^2.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- infection/infection: ^0.35.0
- laminas/laminas-config-aggregator: ^1.19
- phpbench/phpbench: ^1.7
- phpunit/phpunit: ^13.3
- roave/backward-compatibility-check: ^8.21.0
- roave/security-advisories: dev-master
- webware/webware-tools: ^0.1.x-dev
This package is auto-updated.
Last update: 2026-08-24 23:24:21 UTC
README
Provides HTMX support via laminas-view to webware applications: AJAX request detection middleware, HTMX response headers and triggers, and a body-aware laminas-view renderer.
Installation
composer require webware/webware-htmx
Register the ConfigProvider in your Mezzio application config aggregator:
Webware\Htmx\ConfigProvider::class,
What it provides
DetectAjaxRequestMiddleware— detects HTMX requests and filters the incoming server request.DisableBodyMiddleware— disables the body layer for HTMX requests.Webware\Htmx\Response\Header— HTMX response header helpers (HX-Trigger,HX-Redirect, …).Webware\Htmx\View\LaminasRenderer— a laminas-view renderer with body/layout layering, registered as the defaultTemplateRendererInterface.- A default
body::defaulttemplate (app-overridable).
Template override
The default body template ships at body::default. Applications override it by registering their own templates.map['body::default'] path before the package ConfigProvider in the config aggregator.