You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+106-1Lines changed: 106 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## 4.0.0 - unreleased
1
+
## 4.1.0 - unreleased
2
2
3
3
ADDED:
4
4
@@ -8,6 +8,104 @@ REMOVED:
8
8
9
9
FIXED:
10
10
11
+
## 4.0.0 - 2019-04-19
12
+
13
+
This release is the same as 4.0-beta2. The full change set is the following:
14
+
15
+
ADDED:
16
+
17
+
- JSON:API 1.1 related features:
18
+
- Partial support for Profiles
19
+
- Support for `type` links in errors
20
+
-`Resources` can also use the `$object` property to access the object which is being transformed
21
+
- Separate classes for the different types of links instead of the generic `Links` class
22
+
-`DocumentLinks`
23
+
-`ResourceLinks`
24
+
-`RelationshipLinks`
25
+
-`ErrorLinks`
26
+
- New capabilities related to pagination:
27
+
-[#70](https://github.com/woohoolabs/yin/issues/70): Better support for query parameters in pagination links
28
+
-`PaginationFactory` class to decouple Pagination class instantiation from the request
29
+
-`JsonApi::getPaginationFactory()` method to make it easier to retrieve the Pagination Factory
30
+
-`FixedCursorBasedPagination` class which preserves the original behaviour of the changed `CursorBasedPagination`
31
+
-`FixedCursorBasedPaginationProviderTrait` for using it in connection with `FixedCursorBasedPagination`
32
+
-`FixedPageBasedPaginationLinkProviderTrait` for using it in connection with `FixedPageBasedPagination`
33
+
- New capabilities related to relationships:
34
+
-`ResponseInterface::hasToOneRelationship()` to determine if a specific To-One relationship exists
35
+
-`ResponseInterface::hasToManyRelationship()` to determine if a specific To-Many relationship exists
36
+
37
+
CHANGED:
38
+
39
+
- Updated `justinrainbow/json-schema` to v5.2
40
+
-`Documents` should use the `$object` property instead of `$domainObject` (__BREAKING CHANGE__)
41
+
- Links are used strictly according to the spec (__BREAKING CHANGE__):
42
+
-`AbstractSuccessfulDocument::getLinks()` returns `?DocumentLinks` instead of `?Links`
43
+
-`AbstractErrorDocument::getLinks()` returns `?DocumentLinks` instead of `?Links`
44
+
-`ErrorDocument::getLinks()` returns `?DocumentLinks` instead of `?Links`
45
+
-`ErrorDocument::setLinks()` expects a parameter of `?DocumentLinks` type instead of `?Links`
46
+
-`AbstractResource::getLinks()` returns `?ResourceLinks` instead of `Links`
47
+
-`AbstractRelationship::getLinks()` returns `?RelationshipLinks` instead of `Links`
48
+
-`AbstractRelationship::setLinks()` expects a parameter of `?RelationshipLinks` type instead of `Links`
49
+
-`Error::getLinks()` returns `ErrorLinks` instead of `Links`
50
+
-`Error::setLinks()` expects a parameter of `ErrorLinks` instead of `Links`
51
+
- Improvements related to `JsonApiExceptionInterface` (__BREAKING CHANGE__):
52
+
-`JsonApiExceptionInterface` now extends `Throwable`
53
+
-`JsonApiExceptionInterface::getErrorDocument()` must return an `ErrorDocumentInterface` instead of an `AbstractErrorDocument`
54
+
- Improvements related to pagination (__BREAKING CHANGE__):
55
+
- A `$defaultSize` constructor parameter was added to `CursorBasedPagination` to define a default value for the `page[size]` query parameter
56
+
- Properties and methods of `FixedPageBasedPagination` became non-nullable
57
+
- Properties and methods of `OffsetBasedPagination` became non-nullable
58
+
- Properties and methods of `PageBasedPagination` became non-nullable
59
+
- Methods of `PaginationLinkProviderInterface` expect a second parameter with a `$queryString` name
60
+
- Setting the status code and `Content-Type` header of the JSON:API response is done by the `Responder` by default instead of `Serializer`s (__BREAKING CHANGE__):
61
+
- The `Responder` class sets the status code and the `Content-Type` header of the response, while custom `Serializer`s can override them optionally
62
+
-`SerializerInterface::serialize()` only accepts two arguments instead of 3 as the `$responseCode` parameter was removed
63
+
-`JsonSerializer` does not set the `Content-Type` header and the status code of the response anymore
64
+
- Improvements related to relationships (__BREAKING CHANGE__):
65
+
-`ResponseInterface::getToOneRelationship()` throws an exception instead of returning null if the relationship doesn't exist
66
+
-`ResponseInterface::getToManyRelationship()` throws an exception instead of returning null if the relationship doesn't exist
67
+
- The `TransformerTrait::fromSqlToIso8601Time()` method expects a `?DateTimeZone` as its second argument instead of `string` (__BREAKING CHANGE__)
68
+
69
+
REMOVED:
70
+
71
+
- The generic `Links` class (__BREAKING CHANGE__)
72
+
- Methods related to pagination class instantiation were removed from `RequestInterface` (__BREAKING CHANGE__):
- Various deprecated classes (__BREAKING CHANGE__):
78
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractCollectionDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractCollectionDocument` instead
79
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractDocument` instead
80
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractErrorDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractErrorDocument` instead
81
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractSimpleResourceDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractSimpleResourceDocument` instead
82
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractSingleResourceDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractSingleResourceDocument` instead
83
+
-`WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulResourceDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\AbstractSuccessfulResourceDocument` instead
84
+
-`WoohooLabs\Yin\JsonApi\Document\ErrorDocument`: use `WoohooLabs\Yin\JsonApi\Schema\Document\ErrorDocument` instead
85
+
-`WoohooLabs\Yin\JsonApi\Transformer\AbstractResourceTransformer`: use `WoohooLabs\Yin\JsonApi\Schema\Resource\AbstractResource` instead
86
+
-`WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface`: use `WoohooLabs\Yin\JsonApi\Schema\Resource\ResourceInterface` instead
87
+
-`WoohooLabs\Yin\JsonApi\Schema\Error`: use `WoohooLabs\Yin\JsonApi\Schema\Error\Error` instead
88
+
-`WoohooLabs\Yin\JsonApi\Schema\ErrorSource`: use `WoohooLabs\Yin\JsonApi\Schema\Error\ErrorSource` instead
89
+
-`WoohooLabs\Yin\JsonApi\Exception\JsonApiException`: use `WoohooLabs\Yin\JsonApi\Exception\AbstractJsonApiException` instead
90
+
-`WoohooLabs\Yin\JsonApi\Request\Request`: use `WoohooLabs\Yin\JsonApi\Request\JsonApiRequest` instead
91
+
-`WoohooLabs\Yin\JsonApi\Request\RequestInterface`: use `WoohooLabs\Yin\JsonApi\Request\JsonApiRequestInterface` instead
92
+
-`WoohooLabs\Yin\JsonApi\Schema\Link`: use `WoohooLabs\Yin\JsonApi\Schema\Link\Link` instead
93
+
-`WoohooLabs\Yin\JsonApi\Schema\LinkObject`: use `WoohooLabs\Yin\JsonApi\Schema\Link\LinkObject` instead
94
+
- Various deprecated methods (__BREAKING CHANGE__):
- The deprecated `AbstractRelationship::omitWhenNotIncluded()` method (__BREAKING CHANGE__): use `AbstractRelationship::omitDataWhenNotIncluded()`
100
+
101
+
FIXED:
102
+
103
+
- Issues with 0 and non-numeric values when using built-in pagination objects (`PageBasedPagination`, `FixedPageBasedPagination`, `OffsetBasedPagination`)
104
+
- Various issues found by static analysis
105
+
- Query parameters of pagination links were not encoded properly
106
+
- The `page` and `filter` query parameters must have an array value as per the spec
107
+
- Instead of returning null, an exception is thrown when a non-existent relationship is fetched
108
+
11
109
## 4.0.0-beta2 - 2019-04-09
12
110
13
111
REMOVED:
@@ -114,6 +212,13 @@ FIXED:
114
212
- The `page` and `filter` query parameters must have an array value as per the spec
115
213
- Instead of returning null, an exception is thrown when a non-existent relationship is fetched
116
214
215
+
## 3.1.1 - 2019-04-18
216
+
217
+
DEPRECATED:
218
+
219
+
-`ToOneRelationship::omitWhenNotIncluded()`: Use `ToOneRelationship::omitDataWhenNotIncluded()`
220
+
-`ToManyRelationship::omitWhenNotIncluded()`: Use `ToManyRelationship::omitDataWhenNotIncluded()`
221
+
117
222
## 3.1.0 - 2019-01-17
118
223
119
224
This is a release with several deprecations in order to ensure forward compatibility with Yin 4.0.
0 commit comments