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

Commit 6d9609a

Browse files
author
Dominik Zogg
authored
Merge pull request #6 from chubbyphp/v5
v5
2 parents 9fc3f38 + be9bbd1 commit 6d9609a

File tree

132 files changed

+119
-4904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+119
-4904
lines changed

README.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ A simple http handler implementation for API.
2626
## Requirements
2727

2828
* php: ^8.0
29-
* chubbyphp/chubbyphp-deserialization: ^3.4.1
29+
* chubbyphp/chubbyphp-deserialization: ^3.5.1
30+
* chubbyphp/chubbyphp-http-exception: ^1.0
3031
* chubbyphp/chubbyphp-negotiation: ^1.9
31-
* chubbyphp/chubbyphp-serialization: ^3.2
32+
* chubbyphp/chubbyphp-serialization: ^3.3.1
3233
* psr/http-factory: ^1.0.1
3334
* psr/http-message: ^1.0.1
3435
* psr/http-server-middleware: ^1.0.1
@@ -39,38 +40,33 @@ A simple http handler implementation for API.
3940
Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-api-http][1].
4041

4142
```sh
42-
composer require chubbyphp/chubbyphp-api-http "^4.2"
43+
composer require chubbyphp/chubbyphp-api-http "^5.0"
4344
```
4445

4546
## Usage
4647

47-
* [ApiProblem (example)][2]
48-
* [AcceptAndContentTypeMiddlewareFactory][3]
49-
* [ApiExceptionMiddlewareFactory][4]
50-
* [RequestManagerFactory][5]
51-
* [ResponseManagerFactory][6]
52-
* [RequestManager][7]
53-
* [ResponseManager][8]
54-
* [AcceptAndContentTypeMiddleware][9]
55-
* [ApiExceptionMiddleware][10]
56-
* [ApiHttpServiceFactory][11]
57-
* [ApiHttpServiceProvider][12]
58-
* [ApiProblemMapping (example)][13]
48+
* [AcceptAndContentTypeMiddlewareFactory][2]
49+
* [ApiExceptionMiddlewareFactory][3]
50+
* [RequestManagerFactory][4]
51+
* [ResponseManagerFactory][5]
52+
* [RequestManager][6]
53+
* [ResponseManager][7]
54+
* [AcceptAndContentTypeMiddleware][8]
55+
* [ApiExceptionMiddleware][9]
56+
* [ApiHttpServiceFactory][10]
5957

6058
## Copyright
6159

6260
Dominik Zogg 2022
6361

6462
[1]: https://packagist.org/packages/chubbyphp/chubbyphp-api-http
65-
[2]: doc/ApiProblem/ApiProblem.md
66-
[3]: doc/ServiceFactory/AcceptAndContentTypeMiddlewareFactory.md
67-
[4]: doc/ServiceFactory/ApiExceptionMiddlewareFactory.md
68-
[5]: doc/ServiceFactory/RequestManagerFactory.md
69-
[6]: doc/ServiceFactory/ResponseManagerFactory.md
70-
[7]: doc/Manager/RequestManager.md
71-
[8]: doc/Manager/ResponseManager.md
72-
[9]: doc/Middleware/AcceptAndContentTypeMiddleware.md
73-
[10]: doc/Middleware/ApiExceptionMiddleware.md
74-
[11]: doc/ServiceFactory/ApiHttpServiceFactory.md
75-
[12]: doc/ServiceProvider/ApiHttpServiceProvider.md
76-
[13]: doc/Serialization/ApiProblemMapping.md
63+
64+
[2]: doc/ServiceFactory/AcceptAndContentTypeMiddlewareFactory.md
65+
[3]: doc/ServiceFactory/ApiExceptionMiddlewareFactory.md
66+
[4]: doc/ServiceFactory/RequestManagerFactory.md
67+
[5]: doc/ServiceFactory/ResponseManagerFactory.md
68+
[6]: doc/Manager/RequestManager.md
69+
[7]: doc/Manager/ResponseManager.md
70+
[8]: doc/Middleware/AcceptAndContentTypeMiddleware.md
71+
[9]: doc/Middleware/ApiExceptionMiddleware.md
72+
[10]: doc/ServiceFactory/ApiHttpServiceFactory.md

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
],
1212
"require": {
1313
"php": "^8.0",
14-
"chubbyphp/chubbyphp-deserialization": "^3.4.1",
14+
"chubbyphp/chubbyphp-deserialization": "^3.5.1",
15+
"chubbyphp/chubbyphp-http-exception": "^1.0",
1516
"chubbyphp/chubbyphp-negotiation": "^1.9",
16-
"chubbyphp/chubbyphp-serialization": "^3.2",
17+
"chubbyphp/chubbyphp-serialization": "^3.3.1",
1718
"psr/http-factory": "^1.0.1",
1819
"psr/http-message": "^1.0.1",
1920
"psr/http-server-middleware": "^1.0.1",
@@ -48,7 +49,7 @@
4849
},
4950
"extra": {
5051
"branch-alias": {
51-
"dev-master": "4.2-dev"
52+
"dev-master": "5.0-dev"
5253
}
5354
},
5455
"scripts": {

doc/ApiProblem/ApiProblem.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/Manager/ResponseManager.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
```php
44
<?php
55

6-
use Chubbyphp\ApiHttp\ApiProblem\ApiProblemInterface;
76
use Chubbyphp\ApiHttp\Factory\ResponseFactoryInterface;
87
use Chubbyphp\ApiHttp\Manager\ResponseManager;
98
use Chubbyphp\Deserialization\DeserializerInterface;
9+
use Chubbyphp\HttpException\HttpExceptionInterface;
1010
use Chubbyphp\Serialization\SerializerInterface;
1111

1212
/** @var DeserializerInterface $deserializer */
@@ -39,11 +39,11 @@ $response = $responseManager->createRedirect(
3939
'https://www.google.com'
4040
);
4141

42-
/** @var ApiProblemInterface $apiProblem */
43-
$apiProblem = ...;
42+
/** @var HttpExceptionInterface $httpException */
43+
$httpException = ...;
4444

45-
$response = $responseManager->createFromApiProblem(
46-
$apiProblem,
45+
$response = $responseManager->createFromHttpException(
46+
$httpException,
4747
'application/json'
4848
);
4949
```

doc/Serialization/ApiProblemMapping.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

doc/ServiceProvider/ApiHttpServiceProvider.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/ApiProblem/AbstractApiProblem.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/ApiProblem/ApiProblemInterface.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/ApiProblem/ClientError/BadRequest.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/ApiProblem/ClientError/Conflict.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)