Skip to content

Commit

Permalink
PHP 8.4 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 committed Oct 31, 2024
1 parent 9357577 commit 14b8622
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: run-tests

on:
push:
branches: [master]
branches: [master, php84]
pull_request:
branches: [master]

Expand All @@ -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
2 changes: 1 addition & 1 deletion src/Events/Audited.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Audited
* @param \OwenIt\Auditing\Contracts\AuditDriver $driver
* @param \OwenIt\Auditing\Contracts\Audit $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
4 changes: 2 additions & 2 deletions tests/Unit/AuditableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ public function itReturnsTheAuditData()
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 14b8622

Please sign in to comment.