Skip to content

Commit 0bbeef3

Browse files
committed
Merge branch 'release/1.0.0-beta.2' into main
2 parents fd7498b + d7236d1 commit 0bbeef3

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
All notable changes to this project will be documented in this file. This project adheres to
44
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
55

6+
## [1.0.0-beta.2] - 2021-04-20
7+
8+
### Added
9+
10+
- [#65](https://github.com/laravel-json-api/laravel/issues/65) **BREAKING** The `fill()` method on Eloquent fields has
11+
been updated to receive all the validated data as its third argument. This change was made to allow fields to work out
12+
the value to fill into the model based on other JSON:API field values. If you have written any custom fields, you will
13+
need to update the `fill()` method on your field class.
14+
- **BREAKING** Eloquent attributes now support serializing and filling column values on related objects. This is
15+
primarily intended for use with the Eloquent `belongsTo`, `hasOne`, `hasOneThrough` and `morphOne` relationships that
16+
have a `withDefault()` method. As part of this change, the `mustExist()` method was added to the `Fillable` interface.
17+
If you have written any custom fields, you will need to add this method to your field class - it should return `true`
18+
if the attribute needs to be filled *after* the primary model has been persisted.
19+
- [#58](https://github.com/laravel-json-api/laravel/issues/58) Schema model classes can now be a parent class or an
20+
interface.
21+
22+
### Fixed
23+
24+
- [#69](https://github.com/laravel-json-api/laravel/issues/69) Fixed the parsing of empty `include`, `sort` and
25+
`withCount` query parameters.
26+
627
## [1.0.0-beta.1] - 2021-03-30
728

829
### Added

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
"require": {
2626
"php": "^7.4|^8.0",
2727
"ext-json": "*",
28-
"laravel-json-api/core": "^1.0.0-beta.1",
29-
"laravel-json-api/eloquent": "^1.0.0-beta.1",
28+
"laravel-json-api/core": "^1.0.0-beta.2",
29+
"laravel-json-api/eloquent": "^1.0.0-beta.2",
3030
"laravel-json-api/encoder-neomerx": "^1.0.0-beta.1",
31-
"laravel-json-api/exceptions": "^1.0.0-beta.1",
31+
"laravel-json-api/exceptions": "^1.0.0-beta.2",
3232
"laravel-json-api/spec": "^1.0.0-beta.1",
3333
"laravel-json-api/validation": "^1.0.0-beta.1",
3434
"laravel/framework": "^8.0"
3535
},
3636
"require-dev": {
37-
"laravel-json-api/hashids": "^1.0.0-beta.1",
37+
"laravel-json-api/hashids": "^1.0.0-beta.2",
3838
"laravel-json-api/testing": "^1.0.0-beta.1",
3939
"orchestra/testbench": "^6.9",
4040
"phpunit/phpunit": "^9.5"

src/Http/Requests/ResourceQuery.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function guessQueryOneUsing(callable $resolver): void
9595
*/
9696
public static function queryOne(string $resourceType): QueryParameters
9797
{
98-
$resolver = self::$queryManyResolver ?: new RequestResolver(RequestResolver::QUERY);
98+
$resolver = self::$queryOneResolver ?: new RequestResolver(RequestResolver::QUERY);
9999

100100
return $resolver($resourceType);
101101
}

0 commit comments

Comments
 (0)