Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laminas Httphandlerrunner

Laminas Httphandlerrunner Laravel Package

laminas/laminas-httphandlerrunner

Laminas HTTP Handler Runner executes PSR-7 request handlers and PSR-15 middleware, emitting generated responses to the client in traditional PHP server environments.

View on GitHub
Deep Wiki
Context7

laminas-httphandlerrunner provides the glue between a PSR-15 request handler and the PHP runtime, letting you execute middleware pipelines and emit responses without writing boilerplate bootstrap code. It ships a RequestHandlerRunner that converts incoming server requests into PSR-7 instances and dispatches them to your handler.

  • SAPI emitter for sending PSR-7 responses to the client
  • RequestHandlerRunner for consistent request dispatch
  • Supports both traditional and long-running/async runtimes
  • Interoperable with any PSR-7/PSR-15 implementation
  • Integrates cleanly with Mezzio and Laminas applications
Frequently asked questions about Laminas Httphandlerrunner
What is laminas/laminas-httphandlerrunner used for?
It executes PSR-15 RequestHandlerInterface instances and emits the PSR-7 response they return through PHP's SAPI. In practice it lets you run middleware-style or request-handler-based applications without a full framework front controller. Laravel developers use it when they want to bridge PSR-15 handlers into a Laravel or serverless request lifecycle.
How do I install laminas/laminas-httphandlerrunner with Composer?
Run composer require laminas/laminas-httphandlerrunner. For Laravel projects, require it alongside your existing Laravel dependencies and check that your PHP platform satisfies the package constraint. Since 2.14.0 requires PHP 8.2 or newer, pin ^2.13 if you are still on PHP 8.1.
Does laminas-httphandlerrunner integrate with Laravel middleware?
It is not a Laravel-native middleware package, but its PSR-15 handlers can be wrapped or injected into Laravel's middleware pipeline. You can convert Laravel middleware to PSR-15 with Laminas Stratigility or adapt handlers at the boundary. This is useful for modular request handling, API-first services, or DDD-style handlers.
Which PHP versions does laminas-httphandlerrunner 2.14.0 support?
Version 2.14.0 raises the minimum PHP version to 8.2 and drops PHP 8.1 support. It retains PHP 8.5 compatibility from 2.13.0. Applications on PHP 8.1 must stay on 2.13.x or upgrade PHP before adopting 2.14.0.
Is laminas-httphandlerrunner 2.14.0 a breaking change for PHP 8.1?
Functionally it is a minor release, but dropping PHP 8.1 is effectively breaking for 8.1-bound applications. Composer's default ^2.x constraint can silently select 2.14.0 and then fail platform resolution or autoloading on PHP 8.1. Pin to ^2.13 for those apps until PHP 8.2+ is available.
Can I use laminas-httphandlerrunner for AWS Lambda or Bref?
Yes, it fits serverless and edge runtimes where PSR-15 handlers are already common. The package executes a RequestHandlerInterface and emits the response through PHP's SAPI, which Bref-style runtimes can bridge to their event model. Verify your runtime's PSR-7 implementation and emission expectations.
How does laminas-httphandlerrunner emit PSR-7 responses?
It takes the ResponseInterface returned by the request handler and emits its status, headers, and body through PHP's SAPI. That makes it a small bridge between PSR-7/PSR-15 code and native or emulated server environments. You remain responsible for constructing the request and choosing the emitter configuration.
Do I need laminas/stratigility to use laminas-httphandlerrunner?
No, stratigility is optional. The package only needs a PSR-15 RequestHandlerInterface; stratigility helps if you want to compose or convert middleware into PSR-15 pipelines. For a single handler or a Laravel-adapted handler, you can use it directly.
How should I test PSR-15 handlers in a Laravel application?
Unit-test handlers by passing PSR-7 requests and asserting on the returned PSR-7 responses. For integration coverage, exercise the Laravel route or kernel boundary that invokes the handler. This often means adding tests around the adapter rather than relying only on Laravel feature tests.
What are alternatives to laminas-httphandlerrunner for running PSR-15 apps?
Alternatives include framework-specific runners and other PSR-15 dispatchers, but many Laravel apps simply use Laravel's own HTTP kernel. Choose this package when you specifically need to execute PSR-15 handlers and emit PSR-7 responses. Check PHP version support and maintenance status before adopting.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo