Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.
Merged

v5 #6

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ A simple http handler implementation for API.
## Requirements

* php: ^8.0
* chubbyphp/chubbyphp-deserialization: ^3.4.1
* chubbyphp/chubbyphp-deserialization: ^3.5.1
* chubbyphp/chubbyphp-http-exception: ^1.0
* chubbyphp/chubbyphp-negotiation: ^1.9
* chubbyphp/chubbyphp-serialization: ^3.2
* chubbyphp/chubbyphp-serialization: ^3.3.1
* psr/http-factory: ^1.0.1
* psr/http-message: ^1.0.1
* psr/http-server-middleware: ^1.0.1
Expand All @@ -39,38 +40,33 @@ A simple http handler implementation for API.
Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-api-http][1].

```sh
composer require chubbyphp/chubbyphp-api-http "^4.2"
composer require chubbyphp/chubbyphp-api-http "^5.0"
```

## Usage

* [ApiProblem (example)][2]
* [AcceptAndContentTypeMiddlewareFactory][3]
* [ApiExceptionMiddlewareFactory][4]
* [RequestManagerFactory][5]
* [ResponseManagerFactory][6]
* [RequestManager][7]
* [ResponseManager][8]
* [AcceptAndContentTypeMiddleware][9]
* [ApiExceptionMiddleware][10]
* [ApiHttpServiceFactory][11]
* [ApiHttpServiceProvider][12]
* [ApiProblemMapping (example)][13]
* [AcceptAndContentTypeMiddlewareFactory][2]
* [ApiExceptionMiddlewareFactory][3]
* [RequestManagerFactory][4]
* [ResponseManagerFactory][5]
* [RequestManager][6]
* [ResponseManager][7]
* [AcceptAndContentTypeMiddleware][8]
* [ApiExceptionMiddleware][9]
* [ApiHttpServiceFactory][10]

## Copyright

Dominik Zogg 2022

[1]: https://packagist.org/packages/chubbyphp/chubbyphp-api-http
[2]: doc/ApiProblem/ApiProblem.md
[3]: doc/ServiceFactory/AcceptAndContentTypeMiddlewareFactory.md
[4]: doc/ServiceFactory/ApiExceptionMiddlewareFactory.md
[5]: doc/ServiceFactory/RequestManagerFactory.md
[6]: doc/ServiceFactory/ResponseManagerFactory.md
[7]: doc/Manager/RequestManager.md
[8]: doc/Manager/ResponseManager.md
[9]: doc/Middleware/AcceptAndContentTypeMiddleware.md
[10]: doc/Middleware/ApiExceptionMiddleware.md
[11]: doc/ServiceFactory/ApiHttpServiceFactory.md
[12]: doc/ServiceProvider/ApiHttpServiceProvider.md
[13]: doc/Serialization/ApiProblemMapping.md

[2]: doc/ServiceFactory/AcceptAndContentTypeMiddlewareFactory.md
[3]: doc/ServiceFactory/ApiExceptionMiddlewareFactory.md
[4]: doc/ServiceFactory/RequestManagerFactory.md
[5]: doc/ServiceFactory/ResponseManagerFactory.md
[6]: doc/Manager/RequestManager.md
[7]: doc/Manager/ResponseManager.md
[8]: doc/Middleware/AcceptAndContentTypeMiddleware.md
[9]: doc/Middleware/ApiExceptionMiddleware.md
[10]: doc/ServiceFactory/ApiHttpServiceFactory.md
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
],
"require": {
"php": "^8.0",
"chubbyphp/chubbyphp-deserialization": "^3.4.1",
"chubbyphp/chubbyphp-deserialization": "^3.5.1",
"chubbyphp/chubbyphp-http-exception": "^1.0",
"chubbyphp/chubbyphp-negotiation": "^1.9",
"chubbyphp/chubbyphp-serialization": "^3.2",
"chubbyphp/chubbyphp-serialization": "^3.3.1",
"psr/http-factory": "^1.0.1",
"psr/http-message": "^1.0.1",
"psr/http-server-middleware": "^1.0.1",
Expand Down Expand Up @@ -48,7 +49,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
"dev-master": "5.0-dev"
}
},
"scripts": {
Expand Down
16 changes: 0 additions & 16 deletions doc/ApiProblem/ApiProblem.md

This file was deleted.

10 changes: 5 additions & 5 deletions doc/Manager/ResponseManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
```php
<?php

use Chubbyphp\ApiHttp\ApiProblem\ApiProblemInterface;
use Chubbyphp\ApiHttp\Factory\ResponseFactoryInterface;
use Chubbyphp\ApiHttp\Manager\ResponseManager;
use Chubbyphp\Deserialization\DeserializerInterface;
use Chubbyphp\HttpException\HttpExceptionInterface;
use Chubbyphp\Serialization\SerializerInterface;

/** @var DeserializerInterface $deserializer */
Expand Down Expand Up @@ -39,11 +39,11 @@ $response = $responseManager->createRedirect(
'https://www.google.com'
);

/** @var ApiProblemInterface $apiProblem */
$apiProblem = ...;
/** @var HttpExceptionInterface $httpException */
$httpException = ...;

$response = $responseManager->createFromApiProblem(
$apiProblem,
$response = $responseManager->createFromHttpException(
$httpException,
'application/json'
);
```
19 changes: 0 additions & 19 deletions doc/Serialization/ApiProblemMapping.md

This file was deleted.

22 changes: 0 additions & 22 deletions doc/ServiceProvider/ApiHttpServiceProvider.md

This file was deleted.

50 changes: 0 additions & 50 deletions src/ApiProblem/AbstractApiProblem.php

This file was deleted.

23 changes: 0 additions & 23 deletions src/ApiProblem/ApiProblemInterface.php

This file was deleted.

32 changes: 0 additions & 32 deletions src/ApiProblem/ClientError/BadRequest.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/ApiProblem/ClientError/Conflict.php

This file was deleted.

32 changes: 0 additions & 32 deletions src/ApiProblem/ClientError/ExpectationFailed.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/ApiProblem/ClientError/FailedDependency.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/ApiProblem/ClientError/Forbidden.php

This file was deleted.

Loading