runtime/psr-laminas

PSR runtime with laminas/diactoros and laminas/laminas-httphandlerrunner

Maintainers

👁 Nyholm

Package info

github.com/php-runtime/psr-laminas

pkg:composer/runtime/psr-laminas

Fund package maintenance!

nyholm

Statistics

Installs: 21

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

1.0.0 2025-12-18 07:34 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 6c24f730fcb9ced38ae4dc216d3cfad3f29c0a50

  • Tobias Nyholm <tobias.nyholm.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-18 08:49:44 UTC


README

A runtime with laminas/diactoros and laminas/laminas-httphandlerrunner.

If you are new to the Symfony Runtime component, read more in the main readme.

Installation

composer require runtime/psr-laminas

Usage

This runtime is discovered automatically. You can force your application to use this runtime by defining the environment variable APP_RUNTIME.

APP_RUNTIME=Runtime\PsrLaminas\Runtime

PSR-7

// public/index.php

use Psr\Http\Server\RequestHandlerInterface;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (ServerRequestInterface $request) {
 $response = new \Laminas\Diactoros\Response();
 $response->getBody()->write('PSR-7');

 return $response;
};

PSR-15

// public/index.php

use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

class Application implements RequestHandlerInterface {
 // ...
 public function handle(ServerRequestInterface $request): ResponseInterface
 {
 $response = new \Laminas\Diactoros\Response();
 $response->getBody()->write('PSR-15');

 return $response;
 }
}

return function (array $context) {
 return new Application($context['APP_ENV'] ?? 'dev');
};