|
3 | 3 | All notable changes to this project will be documented in this file. This project adheres to |
4 | 4 | [Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/). |
5 | 5 |
|
| 6 | +## [1.0.0-alpha.4] - 2021-02-27 |
| 7 | + |
| 8 | +### Added |
| 9 | + |
| 10 | +- Added missing `jsonapi:authorizer` generator command. |
| 11 | +- The Eloquent schema now has `indexQuery` and `relatableQuery` methods. These allow filtering for authorization |
| 12 | + purposes when a list of resources is being retrieved. For instance, it could filter those queries so that only models |
| 13 | + belonging to the authenticated user are returned. |
| 14 | +- [#23](https://github.com/laravel-json-api/laravel/issues/23) The resource request class now does not need to exist for |
| 15 | + the destroy controller action. Previously the implementation was expecting the resource request class to exist, even |
| 16 | + though delete validation was optional. |
| 17 | +- [#24](https://github.com/laravel-json-api/laravel/issues/24) Controller actions will now stop executing and return a |
| 18 | + response if one is returned by the *before* action hooks: i.e. `searching`, `reading`, `saving`, `creating`, |
| 19 | + `updating`, `deleting`, `readingRelated<Name>`, `reading<Name>`, `updating<Name>`, `attaching<Name>` and |
| 20 | + `detaching<Name>`. |
| 21 | +- [#37](https://github.com/laravel-json-api/laravel/issues/37) Can now use constructor dependency injection in `Server` |
| 22 | + classes. |
| 23 | +- [#40](https://github.com/laravel-json-api/laravel/issues/40) There is now a new `MetaResponse` class that can be used |
| 24 | + when returning meta-only responses. In addition, response classes have been updated to add a `withServer` method. This |
| 25 | + can be used to specify the named server the response should use to encode the JSON:API document. This has to be used |
| 26 | + when returning responses from routes that have not run the JSON:API middleware (i.e. there is no default server |
| 27 | + available via the service container). |
| 28 | +- [#9](https://github.com/laravel-json-api/laravel/issues/9) The Laravel route registrar is now passed through to |
| 29 | + the `resources`, `relationships` and `actions` callbacks as the second function argument. |
| 30 | +- [#36](https://github.com/laravel-json-api/laravel/issues/36) Eloquent schemas now support complex singular filter |
| 31 | + logic, via the `Schema::isSingular()` method. |
| 32 | +- [#33](https://github.com/laravel-json-api/laravel/issues/33) Specification compliance will now reject an incorrect |
| 33 | + resource type in a relationship. For example, if a relationship expects `tags` but the client sends `posts`, the |
| 34 | + request will be rejected with an error message that `posts` are not supported. |
| 35 | + |
| 36 | +### Changed |
| 37 | + |
| 38 | +- [#22](https://github.com/laravel-json-api/laravel/issues/22) **BREAKING** The `index` and `store` methods on the |
| 39 | + authorizer contract now receive the model class as their second argument. This is useful for authorizers that are used |
| 40 | + for multiple resource types. |
| 41 | +- **BREAKING** When querying or modifying models via the schema repository or store, calls to `using()` must be replaced |
| 42 | + with `withRequest()`. This change was made to make it clearer that the request class can be passed into query |
| 43 | + builders. |
| 44 | +- [#28](https://github.com/laravel-json-api/laravel/issues/28) The sparse field sets validation rule will now reject |
| 45 | + with a specific message identifying any resource types in the parameter that do not exist. |
| 46 | +- [#35](https://github.com/laravel-json-api/laravel/issues/35) The `Relation::type()` method must now be used when |
| 47 | + setting the inverse resource type for the relation. |
| 48 | + |
| 49 | +### Fixed |
| 50 | + |
| 51 | +- Optional parameters to generator commands that require values now work correctly. Previously these were incorrectly |
| 52 | + set up as optional parameters that expected no values. |
| 53 | +- [#25](https://github.com/laravel-json-api/laravel/issues/25) The encoder now correctly handles conditional fields when |
| 54 | + iterating over a resource's relationships. |
| 55 | +- [#26](https://github.com/laravel-json-api/laravel/issues/26) Fix parsing the `fields` query parameter to field set |
| 56 | + value objects. |
| 57 | +- [#34](https://github.com/laravel-json-api/laravel/issues/34) Do not require server option when generating a generic |
| 58 | + authorizer with multiple servers present. |
| 59 | +- [#29](https://github.com/laravel-json-api/laravel/issues/29) Do not reject delete requests without a `Content-Type` |
| 60 | + header. |
| 61 | +- [#11](https://github.com/laravel-json-api/laravel/issues/11) Fixed iterating over an empty *to-many* generator twice |
| 62 | + in the underlying compound document encoder. |
| 63 | + |
| 64 | +### Deprecated |
| 65 | + |
| 66 | +- The `Relation::inverseType()` method is deprecated and will be removed in `1.0-stable`. Use `Relation::type()` |
| 67 | + instead. |
| 68 | + |
6 | 69 | ## [1.0.0-alpha.3] - 2021-02-09 |
7 | 70 |
|
8 | 71 | ### Added |
|
0 commit comments