From 778921ba6a45aec515a9ccf06c161035aefca00c Mon Sep 17 00:00:00 2001 From: Christopher Gammie Date: Sat, 30 Nov 2024 16:11:00 +0000 Subject: [PATCH] fix: remove deprecation notices in php 8.4 --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 6 +++++- composer.json | 4 ++-- src/Cursor/Cursor.php | 2 +- src/Cursor/CursorBuilder.php | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae67938..37514a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] laravel: [11] steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b2e44..b172f03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/). -## Unreleased (Laravel 11) +## Unreleased + +### Fixed + +- Remove deprecation notices in PHP 8.4. ## [4.0.0] - 2024-03-14 diff --git a/composer.json b/composer.json index 8aa3d14..6d0d268 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "illuminate/database": "^11.0", "illuminate/pagination": "^11.0", "illuminate/support": "^11.0", - "laravel-json-api/eloquent": "^4.0" + "laravel-json-api/eloquent": "^4.4" }, "require-dev": { "orchestra/testbench": "^9.0", @@ -51,7 +51,7 @@ "dev-develop": "4.x-dev" } }, - "minimum-stability": "stable", + "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true diff --git a/src/Cursor/Cursor.php b/src/Cursor/Cursor.php index 81278ae..cc54f21 100644 --- a/src/Cursor/Cursor.php +++ b/src/Cursor/Cursor.php @@ -38,7 +38,7 @@ class Cursor * @param string|null $after * @param int|null $limit */ - public function __construct(string $before = null, string $after = null, int $limit = null) + public function __construct(?string $before = null, ?string $after = null, ?int $limit = null) { if (is_int($limit) && 1 > $limit) { throw new InvalidArgumentException('Expecting a limit that is 1 or greater.'); diff --git a/src/Cursor/CursorBuilder.php b/src/Cursor/CursorBuilder.php index f5b7a0a..e1493d1 100644 --- a/src/Cursor/CursorBuilder.php +++ b/src/Cursor/CursorBuilder.php @@ -65,7 +65,7 @@ class CursorBuilder * @param string|null $key * the key column that the before/after cursors related to. */ - public function __construct($query, string $column = null, string $key = null) + public function __construct($query, ?string $column = null, ?string $key = null) { if (!$query instanceof Builder && !$query instanceof Relation) { throw new InvalidArgumentException('Expecting an Eloquent query builder or relation.');