chubbyphp / chubbyphp-http-exception
Creates http exceptions which can be catched and converted to error responses.
Package info
github.com/chubbyphp/chubbyphp-http-exception
pkg:composer/chubbyphp/chubbyphp-http-exception
1.3.2
2026-01-16 19:05 UTC
Requires
- php: ^8.3
Requires (Dev)
- chubbyphp/chubbyphp-dev-helper: dev-master
- infection/infection: ^0.32.3
- php-coveralls/php-coveralls: ^2.9.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^12.5.6
README
Description
Creates http exceptions which can be catched and converted to error responses.
Requirements
- php: ^8.3
Installation
Through Composer as chubbyphp/chubbyphp-http-exception.
composer require chubbyphp/chubbyphp-http-exception "^1.3"
Usage
<?php declare(strict_types=1); namespace App; use Chubbyphp\HttpException\HttpException; $exception = new \RuntimeException('error'); $httpException = HttpException::createBadRequest([ 'key1' => 'value1', 'key2' => 'value2' ], $exception);
Copyright
2026 Dominik Zogg