Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/33-response-factory' into release-1.0.0
Browse files Browse the repository at this point in the history
Close #35
Close #33
Fixes #32
  • Loading branch information
weierophinney committed Feb 26, 2018
2 parents 6af8943 + 603cba6 commit fff24df
Show file tree
Hide file tree
Showing 19 changed files with 563 additions and 498 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,64 @@ All notable changes to this project will be documented in this file, in reverse

Versions 0.3.0 and prior were released as "weierophinney/problem-details".

## 1.0.0alpha2 - TBD

### Added

- Nothing.

### Changed

- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsResponseFactory`
such that it now has the following signature:

```php
public function __construct(
callable $responseFactory,
bool $isDebug = self::EXCLUDE_THROWABLE_DETAILS,
int $jsonFlags = null,
bool $exceptionDetailsInResponse = false,
string $defaultDetailMessage = self::DEFAULT_DETAIL_MESSAGE
)
```

Note that the first argument is now a `$responseFactory`, is required, and
must be `callable`. The previous `$responsePrototype` and `$streamFactory`
arguments are now removed.

The `$responseFactory` will be invoked with no arguments, and MUST return a
PSR-7 ResponseInterface instance.

- [#35](https://github.com/zendframework/zend-problem-details/pull/35) modifies
internals of `Zend\ProblemDetails\ProblemDetailsResponseFactoryFactory` as
follows:

- It no longer looks for a `Zend\ProblemDetails\StreamFactory` service.
- It now _requires_ the `Psr\Http\Message\ResponseInterface` service, and
expects it to resolve to a PHP callable capable of producing such an instance
(instead of a response instance directly).

- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsMiddleware`;
the `$responseFactory` argument is now required.

- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsNotFoundHandler`;
the `$responseFactory` argument is now required.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 1.0.0alpha1 - 2018-02-07

### Added
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
"willdurand/negotiation": "^2.3"
},
"require-dev": {
"phpunit/phpunit": "^6.5.5",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-diactoros": "^1.4"
"phpunit/phpunit": "^7.0.1",
"zendframework/zend-coding-standard": "~1.0.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit fff24df

Please sign in to comment.