Skip to content

Commit 78bb16f

Browse files
committed
Merge branch 'release/3.0.0'
2 parents dbb98d4 + 90dded4 commit 78bb16f

15 files changed

+40
-38
lines changed

Diff for: .github/workflows/tests.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [7.4, '8.0', 8.1]
18-
laravel: [8, 9]
19-
exclude:
20-
- php: 7.4
21-
laravel: 9
17+
php: [8.1, 8.2]
18+
laravel: [10]
2219

2320
steps:
2421
- name: Checkout Code
25-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2623

2724
- name: Setup PHP
2825
uses: shivammathur/setup-php@v2
@@ -37,7 +34,7 @@ jobs:
3734
run: composer require "illuminate/database:^${{ matrix.laravel }}" --no-update
3835

3936
- name: Install dependencies
40-
uses: nick-invision/retry@v1
37+
uses: nick-fields/retry@v2
4138
with:
4239
timeout_minutes: 5
4340
max_attempts: 5

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
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+
## [3.0.0] - 2023-02-14
7+
8+
### Changed
9+
10+
- Upgrade to Laravel 10 and set minimum PHP version to 8.1.
11+
- **BREAKING**: The schema's id field must now always be provided to the `CursorPagination::make()` method and/or
12+
constructor.
13+
614
## [2.1.0] - 2023-01-24
715

816
### Added

Diff for: composer.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.4|^8.0",
26+
"php": "^8.1",
2727
"ext-json": "*",
28-
"illuminate/database": "^8.0|^9.0",
29-
"illuminate/pagination": "^8.0|^9.0",
30-
"illuminate/support": "^8.0|^9.0",
31-
"laravel-json-api/eloquent": "^2.0"
28+
"illuminate/database": "^10.0",
29+
"illuminate/pagination": "^10.0",
30+
"illuminate/support": "^10.0",
31+
"laravel-json-api/eloquent": "^3.0"
3232
},
3333
"require-dev": {
34-
"orchestra/testbench": "^6.23|^7.0",
35-
"phpunit/phpunit": "^9.5.10"
34+
"orchestra/testbench": "^8.0",
35+
"phpunit/phpunit": "^9.5.28"
3636
},
3737
"autoload": {
3838
"psr-4": {
@@ -48,7 +48,7 @@
4848
},
4949
"extra": {
5050
"branch-alias": {
51-
"dev-develop": "2.x-dev"
51+
"dev-develop": "3.x-dev"
5252
}
5353
},
5454
"minimum-stability": "stable",

Diff for: src/Cursor/Cursor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: src/Cursor/CursorBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: src/Cursor/CursorPaginator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: src/CursorPage.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: src/CursorPagination.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -31,11 +31,6 @@ class CursorPagination implements Paginator
3131
{
3232
use HasPageMeta;
3333

34-
/**
35-
* @var ID|null
36-
*/
37-
private ?ID $id;
38-
3934
/**
4035
* @var string
4136
*/
@@ -79,22 +74,21 @@ class CursorPagination implements Paginator
7974
/**
8075
* Fluent constructor.
8176
*
82-
* @param ID|null $id
77+
* @param ID $id
8378
* @return CursorPagination
8479
*/
85-
public static function make(ID $id = null): self
80+
public static function make(ID $id): self
8681
{
8782
return new static($id);
8883
}
8984

9085
/**
9186
* CursorPagination constructor.
9287
*
93-
* @param ID|null $id
88+
* @param ID $id
9489
*/
95-
public function __construct(ID $id = null)
90+
public function __construct(private readonly ID $id)
9691
{
97-
$this->id = $id;
9892
$this->before = 'before';
9993
$this->after = 'after';
10094
$this->limit = 'limit';

Diff for: tests/app/Video.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: tests/app/VideoSchema.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: tests/database/factories/VideoFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: tests/database/migrations/2021_07_31_1405_create_video_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: tests/lib/Acceptance/Test.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
3030
use LaravelJsonApi\CursorPagination\CursorPage;
3131
use LaravelJsonApi\CursorPagination\CursorPagination;
3232
use LaravelJsonApi\CursorPagination\Tests\EncodedId;
33+
use LaravelJsonApi\Eloquent\Fields\ID;
3334

3435
class Test extends TestCase
3536
{
@@ -61,7 +62,9 @@ protected function setUp(): void
6162
{
6263
parent::setUp();
6364

64-
$this->paginator = CursorPagination::make();
65+
$this->paginator = CursorPagination::make(
66+
ID::make()->uuid()
67+
);
6568

6669
$this->videos = $this
6770
->getMockBuilder(VideoSchema::class)

Diff for: tests/lib/Acceptance/TestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Diff for: tests/lib/EncodedId.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2022 Cloud Creativity Limited
3+
* Copyright 2023 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)