chubbyphp / chubbyphp-http-exception
Creates http exceptions which can be catched and converted to error responses.
Installs: 22 400
Dependents: 9
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/chubbyphp/chubbyphp-http-exception
Requires
- php: ^8.3
Requires (Dev)
- chubbyphp/chubbyphp-dev-helper: dev-master
- infection/infection: ^0.31.9
- php-coveralls/php-coveralls: ^2.9
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.32
- phpunit/phpunit: ^12.4.5
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
2025 Dominik Zogg