Skip to content

Psr7 Support

Compare
Choose a tag to compare
@mpscholten mpscholten released this 17 Jul 13:02
· 117 commits to master since this release

This release adds first-class Psr7 support:

Just use the Psr7\ControllerHelperTrait and call initRequestParser with a ServerRequestInterface object and you can use the library as expected:

class MyController
{
    use \MPScholten\RequestParser\Psr7\ControllerHelperTrait;

    public function __construct(ServerRequestInterface $request)
    {
        $this->initRequestParser($request);
    }

    public function myAction()
    {
        $someParameter = $this->queryParameter('someParameter')->string()->required();
    }
}

Take a look at the docs to learn more.

Several Documentation Updates:

  • A new section "Is It Production Ready?"
  • Some small fixes