Skip to content

Commit 01a37ec

Browse files
committed
Merge branch 'release/4.1.0'
2 parents c904728 + 0835f97 commit 01a37ec

File tree

5 files changed

+51
-37
lines changed

5 files changed

+51
-37
lines changed

.github/workflows/tests.yml

+32-28
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches:
6+
- main
7+
- develop
68
pull_request:
7-
branches: [ main, develop ]
9+
branches:
10+
- main
11+
- develop
812

913
jobs:
1014
build:
@@ -14,31 +18,31 @@ jobs:
1418
strategy:
1519
fail-fast: true
1620
matrix:
17-
php: [8.2, 8.3]
18-
laravel: [11]
21+
php: [ 8.2, 8.3, 8.4 ]
22+
laravel: [ 11, 12 ]
1923

2024
steps:
21-
- name: Checkout Code
22-
uses: actions/checkout@v4
23-
24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@v2
26-
with:
27-
php-version: ${{ matrix.php }}
28-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
29-
tools: composer:v2
30-
coverage: none
31-
ini-values: error_reporting=E_ALL
32-
33-
- name: Set Laravel Version
34-
run: composer require "illuminate/database:^${{ matrix.laravel }}" --no-update
35-
36-
- name: Install dependencies
37-
uses: nick-fields/retry@v3
38-
with:
39-
timeout_minutes: 5
40-
max_attempts: 5
41-
command: composer update --prefer-dist --no-interaction --no-progress
42-
43-
- name: Execute tests
44-
run: vendor/bin/phpunit
25+
- name: Checkout Code
26+
uses: actions/checkout@v4
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
33+
tools: composer:v2
34+
coverage: none
35+
ini-values: error_reporting=E_ALL
36+
37+
- name: Set Laravel Version
38+
run: composer require "illuminate/database:^${{ matrix.laravel }}" --no-update
39+
40+
- name: Install dependencies
41+
uses: nick-fields/retry@v3
42+
with:
43+
timeout_minutes: 5
44+
max_attempts: 5
45+
command: composer update --prefer-dist --no-interaction --no-progress
46+
47+
- name: Execute tests
48+
run: vendor/bin/phpunit

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
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-
## Unreleased (Laravel 11)
6+
## Unreleased
7+
8+
## [4.1.0] - 2025-02-24
9+
10+
### Added
11+
12+
- Package now supports Laravel 12.
13+
14+
### Fixed
15+
16+
- Remove deprecation notices in PHP 8.4.
717

818
## [4.0.0] - 2024-03-14
919

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
"require": {
2626
"php": "^8.2",
2727
"ext-json": "*",
28-
"illuminate/database": "^11.0",
29-
"illuminate/pagination": "^11.0",
30-
"illuminate/support": "^11.0",
31-
"laravel-json-api/eloquent": "^4.0"
28+
"illuminate/database": "^11.0|^12.0",
29+
"illuminate/pagination": "^11.0|^12.0",
30+
"illuminate/support": "^11.0|^12.0",
31+
"laravel-json-api/eloquent": "^4.5"
3232
},
3333
"require-dev": {
34-
"orchestra/testbench": "^9.0",
35-
"phpunit/phpunit": "^10.5"
34+
"orchestra/testbench": "^9.0|^10.0",
35+
"phpunit/phpunit": "^10.5|^11.0"
3636
},
3737
"autoload": {
3838
"psr-4": {

src/Cursor/Cursor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Cursor
3838
* @param string|null $after
3939
* @param int|null $limit
4040
*/
41-
public function __construct(string $before = null, string $after = null, int $limit = null)
41+
public function __construct(?string $before = null, ?string $after = null, ?int $limit = null)
4242
{
4343
if (is_int($limit) && 1 > $limit) {
4444
throw new InvalidArgumentException('Expecting a limit that is 1 or greater.');

src/Cursor/CursorBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CursorBuilder
6565
* @param string|null $key
6666
* the key column that the before/after cursors related to.
6767
*/
68-
public function __construct($query, string $column = null, string $key = null)
68+
public function __construct($query, ?string $column = null, ?string $key = null)
6969
{
7070
if (!$query instanceof Builder && !$query instanceof Relation) {
7171
throw new InvalidArgumentException('Expecting an Eloquent query builder or relation.');

0 commit comments

Comments
 (0)