Skip to content

Commit 949db91

Browse files
chore: support Laravel 12 (#155)
1 parent 443632b commit 949db91

File tree

3 files changed

+31
-18
lines changed

3 files changed

+31
-18
lines changed

.github/workflows/run-tests.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
name: Run Tests
2+
23
on:
34
push:
45
branches:
56
- master
67
pull_request:
78
schedule:
8-
- cron: 0 0 * * *
9+
- cron: '0 0 * * *'
10+
911
jobs:
1012
run-tests:
1113
runs-on: ubuntu-latest
14+
1215
strategy:
1316
fail-fast: false
1417
matrix:
1518
php:
16-
- 8.4
17-
- 8.3
18-
- 8.2
19-
- 8.1
19+
- '8.4'
20+
- '8.3'
21+
- '8.2'
22+
- '8.1'
2023
laravel:
21-
- 11.*
22-
- 10.*
24+
- '12.*'
25+
- '11.*'
26+
- '10.*'
2327
deps:
2428
- lowest
2529
- latest
2630
include:
31+
- {php: '8.4', laravel: '12.*'}
32+
- {php: '8.3', laravel: '12.*'}
33+
- {php: '8.2', laravel: '12.*'}
34+
2735
- {php: '8.4', laravel: '11.*'}
2836
- {php: '8.3', laravel: '11.*'}
2937
- {php: '8.2', laravel: '11.*'}
@@ -34,32 +42,35 @@ jobs:
3442
- {php: '8.1', laravel: '10.*'}
3543
exclude:
3644
- {php: '8.1', laravel: '11.*'}
45+
- {php: '8.1', laravel: '12.*'}
46+
3747
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.deps }}
48+
3849
steps:
3950
- name: Checkout code
4051
uses: actions/checkout@v4
52+
4153
- name: Cache dependencies
4254
uses: actions/cache@v4
4355
with:
4456
path: ~/.composer/cache/files
45-
key: >-
46-
dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php
47-
}}-composer-${{ hashFiles('composer.json') }}
57+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
58+
4859
- name: Setup PHP
4960
uses: shivammathur/setup-php@v2
5061
with:
51-
php-version: '${{ matrix.php }}'
62+
php-version: ${{ matrix.php }}
5263
coverage: none
5364

5465
- name: Install Laravel ${{ matrix.laravel }}
5566
run: composer require "laravel/framework:${{ matrix.laravel }}" --with-all-dependencies --no-interaction
5667

5768
- name: Install dependencies (lowest)
58-
if: ${{ matrix.deps == 'lowest' }}
69+
if: "${{ matrix.deps == 'lowest' }}"
5970
run: composer update --prefer-lowest --prefer-dist --no-interaction
6071

6172
- name: Install dependencies (latest)
62-
if: ${{ matrix.deps != 'lowest' }}
73+
if: "${{ matrix.deps != 'lowest' }}"
6374
run: composer update --prefer-dist --no-interaction
6475

6576
- name: Execute tests

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
"php": "^8.1",
2525
"honeybadger-io/honeybadger-php": ">=2.23.0",
2626
"sixlive/dotenv-editor": "^1.1|^2.0",
27-
"illuminate/console": "^10.0|^11.0",
28-
"illuminate/support": "^10.0|^11.0",
29-
"monolog/monolog": "^2.0|^3.2",
27+
"illuminate/console": "^10.0|^11.0|^12.0",
28+
"illuminate/support": "^10.0|^11.0|^12.0",
29+
"monolog/monolog": "^2.10|^3.8",
3030
"ext-json": "*"
3131
},
3232
"require-dev": {
3333
"larapack/dd": "^1.0",
3434
"mockery/mockery": "^1.4",
35-
"orchestra/testbench": "^8.0|^9.0",
35+
"orchestra/testbench": "^8.0|^9.0|^10.0",
3636
"phpunit/phpunit": "^10.5|^11.0"
3737
},
3838
"autoload": {
@@ -52,6 +52,8 @@
5252
"config": {
5353
"sort-packages": true
5454
},
55+
"minimum-stability": "dev",
56+
"prefer-stable": true,
5557
"extra": {
5658
"laravel": {
5759
"providers": [

tests/LogEventDriverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function clear(): Reporter
7676
return $this;
7777
}
7878

79-
public function event($eventTypeOrPayload, array $payload = null): void
79+
public function event($eventTypeOrPayload, ?array $payload = null): void
8080
{
8181
$this->events[] = [$eventTypeOrPayload, $payload];
8282
}

0 commit comments

Comments
 (0)