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

v4 #4

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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ A simple http handler implementation for API.
## Requirements

* php: ^7.2
* chubbyphp/chubbyphp-deserialization: ^2.19
* chubbyphp/chubbyphp-deserialization: ^3.0
* chubbyphp/chubbyphp-negotiation: ^1.7
* chubbyphp/chubbyphp-serialization: ^2.15
* chubbyphp/chubbyphp-serialization: ^3.0
* psr/http-factory: ^1.0.1
* psr/http-message: ^1.0.1
* psr/http-server-middleware: ^1.0.1
Expand All @@ -27,7 +27,7 @@ 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 "^3.6"
composer require chubbyphp/chubbyphp-api-http "^4.0"
```

## Usage
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
],
"require": {
"php": "^7.2",
"chubbyphp/chubbyphp-deserialization": "^2.19",
"chubbyphp/chubbyphp-deserialization": "^3.0",
"chubbyphp/chubbyphp-negotiation": "^1.7",
"chubbyphp/chubbyphp-serialization": "^2.15",
"chubbyphp/chubbyphp-serialization": "^3.0",
"psr/http-factory": "^1.0.1",
"psr/http-message": "^1.0.1",
"psr/http-server-middleware": "^1.0.1",
Expand Down Expand Up @@ -44,7 +44,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.6-dev"
"dev-master": "4.0-dev"
}
},
"scripts": {
Expand Down
26 changes: 0 additions & 26 deletions src/Container/AcceptAndContentTypeMiddlewareFactory.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Container/ApiExceptionMiddlewareFactory.php

This file was deleted.

23 changes: 0 additions & 23 deletions src/Container/RequestManagerFactory.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Container/ResponseManagerFactory.php

This file was deleted.

28 changes: 3 additions & 25 deletions src/Manager/ResponseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Chubbyphp\ApiHttp\Manager;

use Chubbyphp\ApiHttp\ApiProblem\ApiProblemInterface;
use Chubbyphp\Deserialization\DeserializerInterface;
use Chubbyphp\Serialization\Normalizer\NormalizerContextInterface;
use Chubbyphp\Serialization\SerializerInterface;
use Psr\Http\Message\ResponseFactoryInterface;
Expand All @@ -23,21 +22,10 @@ final class ResponseManager implements ResponseManagerInterface
*/
private $serializer;

public function __construct()
public function __construct(ResponseFactoryInterface $responseFactory, SerializerInterface $serializer)
{
$args = func_get_args();

if ($args[0] instanceof DeserializerInterface) {
@trigger_error(
'Remove deserializer as first argument.',
E_USER_DEPRECATED
);

array_shift($args);
}

$this->setResponseFactory($args[0]);
$this->setSerializer($args[1]);
$this->responseFactory = $responseFactory;
$this->serializer = $serializer;
}

/**
Expand Down Expand Up @@ -88,14 +76,4 @@ public function createFromApiProblem(

return $response;
}

private function setResponseFactory(ResponseFactoryInterface $responseFactory): void
{
$this->responseFactory = $responseFactory;
}

private function setSerializer(SerializerInterface $serializer): void
{
$this->serializer = $serializer;
}
}
27 changes: 0 additions & 27 deletions src/Provider/ApiHttpProvider.php

This file was deleted.

50 changes: 0 additions & 50 deletions tests/Unit/Container/AcceptAndContentTypeMiddlewareFactoryTest.php

This file was deleted.

46 changes: 0 additions & 46 deletions tests/Unit/Container/ApiExceptionMiddlewareFactoryTest.php

This file was deleted.

40 changes: 0 additions & 40 deletions tests/Unit/Container/RequestManagerFactoryTest.php

This file was deleted.

Loading