https://github.com/php-runtime/roadrunner-nyholm
[READ ONLY]
https://github.com/php-runtime/roadrunner-nyholm
roadrunner runtime
Last synced: 4 months ago
JSON representation
[READ ONLY]
- Host: GitHub
- URL: https://github.com/php-runtime/roadrunner-nyholm
- Owner: php-runtime
- License: mit
- Created: 2021-03-20T09:57:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-12-02T15:44:25.000Z (4 months ago)
- Last Synced: 2025-12-05T13:48:37.556Z (4 months ago)
- Topics: roadrunner, runtime
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# RoadRunner Runtime with nyholm/psr7
A runtime for [RoadRunner](https://roadrunner.dev/).
If you are new to the Symfony Runtime component, read more in the [main readme](https://github.com/php-runtime/runtime).
## Installation
```
composer require runtime/roadrunner-nyholm
```
## Usage
Define the environment variable `APP_RUNTIME` for your application.
```
APP_RUNTIME=Runtime\RoadRunnerNyholm\Runtime
```
### PSR-7
```php
// public/index.php
use Psr\Http\Message\ServerRequestInterface;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function () {
return function (ServerRequestInterface $request) {
return new \Nyholm\Psr7\Response(200, [], 'Hello PSR-7');
};
};
```
### PSR-15
```php
// public/index.php
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
class Application implements RequestHandlerInterface {
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new \Nyholm\Psr7\Response(200, [], 'Hello PSR-15');
}
}
return function () {
return new Application();
};
```