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

Commit 127071a

Browse files
committed
Merging release-1.0.0 to master in preparation for 1.0.0 release
2 parents 2a074ae + d4a4652 commit 127071a

29 files changed

+879
-801
lines changed

CHANGELOG.md

+77
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,83 @@ All notable changes to this project will be documented in this file, in reverse
44

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

7+
## 1.0.0 - 2018-03-15
8+
9+
### Added
10+
11+
- [#30](https://github.com/zendframework/zend-problem-details/pull/30)
12+
adds PSR-15 support.
13+
14+
### Changed
15+
16+
- [#24](https://github.com/zendframework/zend-problem-details/pull/24)
17+
updates all classes to use scalar and return type hints, including nullable
18+
and void types. If you were extending classes within an earlier release, you
19+
may need to update signatures of any methods you override.
20+
21+
- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
22+
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsResponseFactory`
23+
such that it now has the following signature:
24+
25+
```php
26+
public function __construct(
27+
callable $responseFactory,
28+
bool $isDebug = self::EXCLUDE_THROWABLE_DETAILS,
29+
int $jsonFlags = null,
30+
bool $exceptionDetailsInResponse = false,
31+
string $defaultDetailMessage = self::DEFAULT_DETAIL_MESSAGE
32+
)
33+
```
34+
35+
Note that the first argument is now a `$responseFactory`, is required, and
36+
must be `callable`. The previous `$responsePrototype` and `$streamFactory`
37+
arguments are now removed.
38+
39+
The `$responseFactory` will be invoked with no arguments, and MUST return a
40+
PSR-7 ResponseInterface instance.
41+
42+
- [#35](https://github.com/zendframework/zend-problem-details/pull/35) modifies
43+
internals of `Zend\ProblemDetails\ProblemDetailsResponseFactoryFactory` as
44+
follows:
45+
46+
- It no longer looks for a `Zend\ProblemDetails\StreamFactory` service.
47+
- It now _requires_ the `Psr\Http\Message\ResponseInterface` service, and
48+
expects it to resolve to a PHP callable capable of producing such an instance
49+
(instead of a response instance directly).
50+
51+
- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
52+
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsMiddleware`;
53+
the `$responseFactory` argument is now required.
54+
55+
- [#35](https://github.com/zendframework/zend-problem-details/pull/35)
56+
modifies the constructor of `Zend\ProblemDetails\ProblemDetailsNotFoundHandler`;
57+
the `$responseFactory` argument is now required.
58+
59+
- [#34](https://github.com/zendframework/zend-problem-details/pull/34) updates
60+
the behavior when passing null as the `$jsonFlag` parameter to the
61+
`Zend\ProblemDetails\ProblemDetailsResponseFactory` constructor; in such
62+
situations, the default `json_encode()` flags will include `JSON_PRETTY_PRINT`
63+
only when the `$isDebug` argument is boolean `true`.
64+
65+
### Deprecated
66+
67+
- Nothing.
68+
69+
### Removed
70+
71+
- [#22](https://github.com/zendframework/zend-problem-details/pull/22) and
72+
[#30](https://github.com/zendframework/zend-problem-details/pull/30)
73+
remove support for both `http-interop/http-middleware` and
74+
`http-interop/http-server-middleware`.
75+
76+
- [#22](https://github.com/zendframework/zend-problem-details/pull/22)
77+
removes `MissingResponseException` as it cannot be thrown anymore,
78+
because interfaces have PHP7 return type and `TypeError` will be thrown.
79+
80+
### Fixed
81+
82+
- Nothing.
83+
784
## 0.5.3 - 2018-03-12
885

986
### Added

composer.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@
2121
"php": "^7.1",
2222
"ext-json": "*",
2323
"fig/http-message-util": "^1.1.2",
24-
"http-interop/http-middleware": "^0.4.1",
2524
"psr/container": "^1.0",
2625
"psr/http-message": "^1.0",
26+
"psr/http-server-middleware": "^1.0",
2727
"spatie/array-to-xml": "^2.3",
28-
"webimpress/http-middleware-compatibility": "^0.1.1",
2928
"willdurand/negotiation": "^2.3"
3029
},
3130
"require-dev": {
32-
"phpunit/phpunit": "^6.3.1",
33-
"zendframework/zend-coding-standard": "~1.0.0",
34-
"zendframework/zend-diactoros": "^1.4"
31+
"phpunit/phpunit": "^7.0.1",
32+
"zendframework/zend-coding-standard": "~1.0.0"
3533
},
3634
"autoload": {
3735
"psr-4": {
@@ -51,8 +49,8 @@
5149
"config-provider": "Zend\\ProblemDetails\\ConfigProvider"
5250
},
5351
"branch-alias": {
54-
"dev-master": "0.5.x-dev",
55-
"dev-release-1.0.0": "1.0.x-dev"
52+
"dev-master": "1.0.x-dev",
53+
"dev-develop": "1.1.x-dev"
5654
}
5755
},
5856
"scripts": {

0 commit comments

Comments
 (0)