File tree Expand file tree Collapse file tree 8 files changed +25
-42
lines changed Expand file tree Collapse file tree 8 files changed +25
-42
lines changed Original file line number Diff line number Diff line change 1414 strategy :
1515 fail-fast : true
1616 matrix :
17- php : ['8.0', 8.1, 8.2]
18- laravel : [9 ]
17+ php : [8.1, 8.2]
18+ laravel : [10 ]
1919
2020 steps :
2121 - name : Checkout Code
Original file line number Diff line number Diff line change 33All 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+ ## Unreleased (6.0)
7+
8+ ### Changed
9+
10+ - Dropped support for PHP 8.0 - minimum PHP version is now 8.1.
11+ - Upgraded to Laravel 10, dropping support for Laravel 9.
12+
613## [ 5.0.0] - 2023-01-21
714
815### Changed
Original file line number Diff line number Diff line change 2222 }
2323 ],
2424 "require" : {
25- "php" : " ^8.0 " ,
25+ "php" : " ^8.1 " ,
2626 "ext-json" : " *" ,
2727 "laravel-json-api/neomerx-json-api" : " ^5.0.1" ,
28- "laravel/framework" : " ^9 .0" ,
28+ "laravel/framework" : " ^10 .0" ,
2929 "nyholm/psr7" : " ^1.2" ,
3030 "ramsey/uuid" : " ^4.0" ,
3131 "symfony/psr-http-message-bridge" : " ^2.0"
3232 },
3333 "require-dev" : {
3434 "ext-sqlite3" : " *" ,
3535 "guzzlehttp/guzzle" : " ^7.0" ,
36- "laravel-json-api/testing" : " ^1.1 " ,
36+ "laravel-json-api/testing" : " ^2.0 " ,
3737 "laravel/legacy-factories" : " ^1.0.4" ,
38- "laravel/ui" : " ^3.0 " ,
38+ "laravel/ui" : " ^4.2 " ,
3939 "mockery/mockery" : " ^1.1" ,
40- "orchestra/testbench" : " ^6.23|^7 .0" ,
41- "phpunit/phpunit" : " ^9.5.10 "
40+ "orchestra/testbench" : " ^8 .0" ,
41+ "phpunit/phpunit" : " ^9.5.28 "
4242 },
4343 "suggest" : {
4444 "cloudcreativity/json-api-testing" : " Required to use the test helpers."
7272 }
7373 }
7474 },
75- "minimum-stability" : " stable " ,
75+ "minimum-stability" : " dev " ,
7676 "prefer-stable" : true ,
7777 "config" : {
7878 "sort-packages" : true
Original file line number Diff line number Diff line change @@ -74,19 +74,13 @@ class ClientJob extends Model implements AsynchronousProcess
7474 */
7575 protected $ casts = [
7676 'attempts ' => 'integer ' ,
77+ 'completed_at ' => 'datetime ' ,
7778 'failed ' => 'boolean ' ,
7879 'timeout ' => 'integer ' ,
80+ 'timeout_at ' => 'datetime ' ,
7981 'tries ' => 'integer ' ,
8082 ];
8183
82- /**
83- * @var array
84- */
85- protected $ dates = [
86- 'completed_at ' ,
87- 'timeout_at ' ,
88- ];
89-
9084 /**
9185 * @inheritdoc
9286 */
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ class Post extends Model
4343 /**
4444 * @var array
4545 */
46- protected $ dates = [
47- 'published_at ' ,
48- 'deleted_at ' ,
46+ protected $ casts = [
47+ 'deleted_at ' => ' datetime ' ,
48+ 'published_at ' => ' datetime ' ,
4949 ];
5050
5151 /**
Original file line number Diff line number Diff line change 1717
1818namespace CloudCreativity \LaravelJsonApi \Tests \Integration ;
1919
20- use Carbon \Carbon ;
2120use CloudCreativity \LaravelJsonApi \Document \Error \Error ;
2221use CloudCreativity \LaravelJsonApi \Exceptions \DocumentRequiredException ;
2322use CloudCreativity \LaravelJsonApi \Exceptions \InvalidJsonException ;
2423use CloudCreativity \LaravelJsonApi \Exceptions \JsonApiException ;
2524use CloudCreativity \LaravelJsonApi \Exceptions \ResourceNotFoundException ;
2625use DummyApp \Post ;
2726use Illuminate \Contracts \Validation \Validator ;
28- use Illuminate \Foundation \Http \Exceptions \MaintenanceModeException ;
2927use Illuminate \Http \Response ;
3028use Illuminate \Session \TokenMismatchException ;
3129use Illuminate \Support \Facades \Route ;
@@ -326,24 +324,6 @@ public function testJsonApiException2(): void
326324 ->assertExactJson ($ expected );
327325 }
328326
329- public function testMaintenanceMode ()
330- {
331- $ ex = new MaintenanceModeException (Carbon::now ()->getTimestamp (), 60 , "We'll be back soon. " );
332-
333- $ this ->request ($ ex )
334- ->assertStatus (503 )
335- ->assertHeader ('Content-Type ' , 'application/vnd.api+json ' )
336- ->assertExactJson ([
337- 'errors ' => [
338- [
339- 'title ' => 'Service Unavailable ' ,
340- 'detail ' => "We'll be back soon. " ,
341- 'status ' => '503 ' ,
342- ],
343- ],
344- ]);
345- }
346-
347327 /**
348328 * By default Laravel sends a 419 response for a TokenMismatchException.
349329 *
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ protected function setUp(): void
4545 {
4646 parent ::setUp ();
4747
48+ $ this ->markTestSkipped ('@TODO requires bugfix: https://github.com/laravel/framework/pull/45864 ' );
49+
4850 // required for tests to work in Laravel 5.7
4951 if (method_exists ($ this , 'withoutMockingConsoleOutput ' )) {
5052 $ this ->withoutMockingConsoleOutput ();
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class Blog extends Model
3434 /**
3535 * @var array
3636 */
37- protected $ dates = [
38- 'published_at ' ,
37+ protected $ casts = [
38+ 'published_at ' => ' datetime ' ,
3939 ];
4040}
You can’t perform that action at this time.
0 commit comments