Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 2.4 KB

README.md

File metadata and controls

97 lines (65 loc) · 2.4 KB

SapiBridge

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Email

The Thruster SapiBridge Bridge.

Install

Via Composer

$ composer require thruster/sapi-bridge

Usage

Any class which implements PSR-15 RequestHandlerInterface.

<?php

require_once __DIR__ . '/../vendor/autoload.php';

use Thruster\SapiBridge\SapiBridge;
use Psr\Http\Server\RequestHandlerInterface;

$kernel = new class implements RequestHandlerInterface {
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return new Response();
    }
};

SapiBridge::createFromGlobals()
    ->attach($kernel)
    ->run();

Testing

Run test cases

$ composer test

Run test cases with coverage (HTML format)

$ composer test-coverage

Run PHP style checker

$ composer check-style

Run PHP style fixer

$ composer fix-style

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.