Skip to content

Commit 701c4fa

Browse files
committed
fix: remove deprecation notices in PHP 8.4
1 parent cb74c31 commit 701c4fa

37 files changed

+53
-48
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [8.2, 8.3]
17+
php: [8.2, 8.3, 8.4]
1818
laravel: [11]
1919

2020
steps:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. This projec
55

66
## Unreleased
77

8+
### Fixed
9+
10+
- Remove deprecation notices in PHP 8.4.
11+
812
## [4.3.1] - 2024-10-31
913

1014
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"ext-json": "*",
2828
"illuminate/database": "^11.0",
2929
"illuminate/support": "^11.0",
30-
"laravel-json-api/core": "^4.0"
30+
"laravel-json-api/core": "^4.3.2"
3131
},
3232
"require-dev": {
3333
"orchestra/testbench": "^9.0",

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
failOnWarning="true"
1414
failOnDeprecation="true"
1515
failOnNotice="true"
16+
displayDetailsOnTestsThatTriggerDeprecations="true"
1617
>
1718
<coverage/>
1819
<testsuites>

src/Fields/ArrayHash.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ArrayHash extends Attribute
5555
* @param string|null $column
5656
* @return ArrayHash
5757
*/
58-
public static function make(string $fieldName, string $column = null): self
58+
public static function make(string $fieldName, ?string $column = null): self
5959
{
6060
return new self($fieldName, $column);
6161
}

src/Fields/ArrayList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ArrayList extends Attribute
3030
* @param string|null $column
3131
* @return ArrayList
3232
*/
33-
public static function make(string $fieldName, string $column = null): self
33+
public static function make(string $fieldName, ?string $column = null): self
3434
{
3535
return new self($fieldName, $column);
3636
}

src/Fields/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ abstract protected function assertValue($value): void;
9191
* @param string $fieldName
9292
* @param string|null $column
9393
*/
94-
public function __construct(string $fieldName, string $column = null)
94+
public function __construct(string $fieldName, ?string $column = null)
9595
{
9696
if (empty($fieldName)) {
9797
throw new InvalidArgumentException('Expecting a non-empty string field name.');

src/Fields/Boolean.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Boolean extends Attribute
2121
* @param string|null $column
2222
* @return Boolean
2323
*/
24-
public static function make(string $fieldName, string $column = null): self
24+
public static function make(string $fieldName, ?string $column = null): self
2525
{
2626
return new self($fieldName, $column);
2727
}

src/Fields/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DateTime extends Attribute
3737
* @param string|null $column
3838
* @return static
3939
*/
40-
public static function make(string $fieldName, string $column = null): self
40+
public static function make(string $fieldName, ?string $column = null): self
4141
{
4242
return new static($fieldName, $column);
4343
}

src/Fields/ID.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ID implements IDContract, Fillable
3636
* @param string|null $column
3737
* @return static
3838
*/
39-
public static function make(string $column = null): self
39+
public static function make(?string $column = null): self
4040
{
4141
return new static($column);
4242
}
@@ -46,7 +46,7 @@ public static function make(string $column = null): self
4646
*
4747
* @param string|null $column
4848
*/
49-
public function __construct(string $column = null)
49+
public function __construct(?string $column = null)
5050
{
5151
$this->column = $column ?: null;
5252
$this->sortable();

0 commit comments

Comments
 (0)