Skip to content

Commit cb92324

Browse files
Laravel 12.x Compatibility (#94)
* Bump dependencies for Laravel 12 * Update GitHub Actions for Laravel 12 * Update run-tests.yml --------- Co-authored-by: Freek Van der Herten <[email protected]>
1 parent 29f3025 commit cb92324

File tree

2 files changed

+73
-65
lines changed

2 files changed

+73
-65
lines changed

.github/workflows/run-tests.yml

Lines changed: 71 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,83 @@
11
name: run-tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
1010

1111
jobs:
12-
test:
13-
runs-on: ${{ matrix.os }}
12+
test:
13+
runs-on: ${{ matrix.os }}
1414

15-
strategy:
16-
fail-fast: true
17-
matrix:
18-
os: [ubuntu-latest]
19-
php: [8.2, 8.1, 8.0, 7.4]
20-
laravel: ['7.*', '8.*', '9.*', '10.*', '11.*']
21-
stability: [prefer-lowest, prefer-stable]
22-
include:
23-
- laravel: 10.*
24-
testbench: 8.*
25-
- laravel: 9.*
26-
testbench: 7.*
27-
- laravel: 8.*
28-
testbench: ^6.23
29-
- laravel: 7.*
30-
testbench: ^5.20
31-
- laravel: 11.*
32-
testbench: 9.*
33-
exclude:
34-
- php: 7.4
35-
laravel: 10.*
36-
- php: 8.0
37-
laravel: 10.*
38-
- php: 7.4
39-
laravel: 9.*
40-
- php: 8.1
41-
laravel: 7.*
42-
- php: 8.2
43-
laravel: 7.*
44-
- laravel: 11.*
45-
php: 8.1
46-
- laravel: 11.*
47-
php: 8.0
48-
- laravel: 11.*
49-
php: 7.4
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
os: [ubuntu-latest]
19+
php: [8.2, 8.1, 8.0, 7.4]
20+
laravel: ['7.*', '8.*', '9.*', '10.*', '11.*', '12.*']
21+
stability: [prefer-lowest, prefer-stable]
22+
include:
23+
- laravel: 10.*
24+
testbench: 8.*
25+
- laravel: 9.*
26+
testbench: 7.*
27+
- laravel: 8.*
28+
testbench: ^6.23
29+
- laravel: 7.*
30+
testbench: ^5.20
31+
- laravel: 11.*
32+
testbench: 9.*
33+
- laravel: 12.*
34+
testbench: 10.*
35+
exclude:
36+
- php: 7.4
37+
laravel: 10.*
38+
- php: 8.0
39+
laravel: 10.*
40+
- php: 7.4
41+
laravel: 9.*
42+
- php: 8.1
43+
laravel: 7.*
44+
- php: 8.2
45+
laravel: 7.*
46+
- laravel: 11.*
47+
php: 8.1
48+
- laravel: 11.*
49+
php: 8.0
50+
- laravel: 11.*
51+
php: 7.4
52+
- laravel: 12.*
53+
php: 8.1
54+
- laravel: 12.*
55+
php: 8.0
56+
- laravel: 12.*
57+
php: 7.4
5058

51-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
59+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
5260

53-
steps:
54-
- name: Checkout code
55-
uses: actions/checkout@v2
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v2
5664

57-
- name: Setup PHP
58-
uses: shivammathur/setup-php@v2
59-
with:
60-
php-version: ${{ matrix.php }}
61-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
62-
coverage: none
65+
- name: Setup PHP
66+
uses: shivammathur/setup-php@v2
67+
with:
68+
php-version: ${{ matrix.php }}
69+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
70+
coverage: none
6371

64-
- name: Setup problem matchers
65-
run: |
66-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
67-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
72+
- name: Setup problem matchers
73+
run: |
74+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
75+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6876
69-
- name: Install dependencies
70-
run: |
71-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.65" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
72-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
77+
- name: Install dependencies
78+
run: |
79+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
80+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
7381
74-
- name: Execute tests
75-
run: vendor/bin/phpunit
82+
- name: Execute tests
83+
run: vendor/bin/phpunit

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
],
1212
"require": {
1313
"php": "^7.4|^8.0",
14-
"laravel/framework": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
14+
"laravel/framework": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
1515
"league/glide": "^1.5|^1.6|^2.0"
1616
},
1717
"require-dev": {
18-
"orchestra/testbench": "^5.20|^6.13|^7.0|^8.0|^9.0"
18+
"orchestra/testbench": "^5.20|^6.13|^7.0|^8.0|^9.0|^10.0"
1919
},
2020
"autoload": {
2121
"psr-4": {

0 commit comments

Comments
 (0)