Skip to content

Commit

Permalink
fix: remove deprecation notices in php 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lindyhopchris committed Nov 30, 2024
1 parent 91e1286 commit 778921b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -51,7 +51,7 @@
"dev-develop": "4.x-dev"
}
},
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
Expand Down
2 changes: 1 addition & 1 deletion src/Cursor/Cursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
2 changes: 1 addition & 1 deletion src/Cursor/CursorBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit 778921b

Please sign in to comment.