Skip to content

Commit 23ff144

Browse files
authored
PHP 8.4 deprecation (#981)
1 parent 9357577 commit 23ff144

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

.github/workflows/run-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php: [7.4, 8.0, 8.1, 8.2, 8.3]
15+
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
1616
laravel: [ 11.*, 10.*, 9.*, 8.*, 7.* ]
1717
include:
1818
- laravel: 11.*
@@ -38,14 +38,20 @@ jobs:
3838
php: 8.0
3939
- laravel: 9.*
4040
php: 7.4
41+
- laravel: 9.*
42+
php: 8.4
4143
- laravel: 8.*
4244
php: 8.3
45+
- laravel: 8.*
46+
php: 8.4
4347
- laravel: 7.*
4448
php: 8.1
4549
- laravel: 7.*
4650
php: 8.2
4751
- laravel: 7.*
4852
php: 8.3
53+
- laravel: 7.*
54+
php: 8.4
4955

5056
name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.dependency-version }}
5157

src/Events/Audited.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class Audited
3434
*
3535
* @param \OwenIt\Auditing\Contracts\Auditable $model
3636
* @param \OwenIt\Auditing\Contracts\AuditDriver $driver
37-
* @param \OwenIt\Auditing\Contracts\Audit $audit
37+
* @param \OwenIt\Auditing\Contracts\Audit|null $audit
3838
*/
39-
public function __construct(Auditable $model, AuditDriver $driver, Audit $audit = null)
39+
public function __construct(Auditable $model, AuditDriver $driver, ?Audit $audit = null)
4040
{
4141
$this->model = $model;
4242
$this->driver = $driver;

src/Exceptions/AuditableTransitionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AuditableTransitionException extends AuditingException
1616
/**
1717
* {@inheritdoc}
1818
*/
19-
public function __construct($message = '', array $incompatibilities = [], $code = 0, Throwable $previous = null)
19+
public function __construct($message = '', array $incompatibilities = [], $code = 0, ?Throwable $previous = null)
2020
{
2121
parent::__construct($message, $code, $previous);
2222

tests/Unit/AuditableTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,14 @@ public function itReturnsTheAuditData()
488488
*
489489
* @param string $guard
490490
* @param string $driver
491-
* @param int $id
492-
* @param string $type
491+
* @param int|null $id
492+
* @param string|null $type
493493
*/
494494
public function itReturnsTheAuditDataIncludingUserAttributes(
495495
string $guard,
496496
string $driver,
497-
int $id = null,
498-
string $type = null
497+
?int $id = null,
498+
?string $type = null
499499
) {
500500
$this->app['config']->set('audit.user.guards', [
501501
$guard,

0 commit comments

Comments
 (0)