Skip to content

Commit

Permalink
PHP 8.4 deprecation (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Oct 31, 2024
1 parent 9357577 commit 23ff144
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
laravel: [ 11.*, 10.*, 9.*, 8.*, 7.* ]
include:
- laravel: 11.*
Expand All @@ -38,14 +38,20 @@ jobs:
php: 8.0
- laravel: 9.*
php: 7.4
- laravel: 9.*
php: 8.4
- laravel: 8.*
php: 8.3
- laravel: 8.*
php: 8.4
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
- laravel: 7.*
php: 8.4

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

Expand Down
4 changes: 2 additions & 2 deletions src/Events/Audited.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class Audited
*
* @param \OwenIt\Auditing\Contracts\Auditable $model
* @param \OwenIt\Auditing\Contracts\AuditDriver $driver
* @param \OwenIt\Auditing\Contracts\Audit $audit
* @param \OwenIt\Auditing\Contracts\Audit|null $audit
*/
public function __construct(Auditable $model, AuditDriver $driver, Audit $audit = null)
public function __construct(Auditable $model, AuditDriver $driver, ?Audit $audit = null)
{
$this->model = $model;
$this->driver = $driver;
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/AuditableTransitionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AuditableTransitionException extends AuditingException
/**
* {@inheritdoc}
*/
public function __construct($message = '', array $incompatibilities = [], $code = 0, Throwable $previous = null)
public function __construct($message = '', array $incompatibilities = [], $code = 0, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);

Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/AuditableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,14 +488,14 @@ public function itReturnsTheAuditData()
*
* @param string $guard
* @param string $driver
* @param int $id
* @param string $type
* @param int|null $id
* @param string|null $type
*/
public function itReturnsTheAuditDataIncludingUserAttributes(
string $guard,
string $driver,
int $id = null,
string $type = null
?int $id = null,
?string $type = null
) {
$this->app['config']->set('audit.user.guards', [
$guard,
Expand Down

0 comments on commit 23ff144

Please sign in to comment.