Skip to content

Commit 9844a7c

Browse files
authored
Merge pull request #994 from laravel-shift/l12-compatibility
Laravel 12.x Compatibility
2 parents dc7c17a + 743f5b6 commit 9844a7c

File tree

2 files changed

+71
-74
lines changed

2 files changed

+71
-74
lines changed

.github/workflows/run-tests.yml

Lines changed: 65 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,79 @@
11
name: run-tests
22

33
on:
4-
push:
5-
paths:
6-
- '**.php'
7-
- '.github/workflows/run-tests.yml'
8-
- 'phpunit.xml.dist'
9-
- 'composer.json'
10-
- 'composer.lock'
4+
push:
5+
paths:
6+
- **.php
7+
- .github/workflows/run-tests.yml
8+
- phpunit.xml.dist
9+
- composer.json
10+
- composer.lock
1111

1212
jobs:
13-
test:
14-
runs-on: ${{ matrix.os }}
15-
timeout-minutes: 5
16-
strategy:
17-
fail-fast: true
18-
matrix:
19-
os: [ubuntu-latest]
20-
php: [8.3, 8.2]
21-
laravel: [10.*, 11.*]
22-
stability: [prefer-stable]
23-
include:
24-
- laravel: 11.*
25-
testbench: 9.*
26-
carbon: ^2.63
27-
- laravel: 10.*
28-
testbench: 8.*
13+
test:
14+
runs-on: ${{ matrix.os }}
2915

30-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
16+
timeout-minutes: 5
3117

32-
services:
33-
mysql:
34-
image: mysql:8.0
35-
env:
36-
MYSQL_USER: user
37-
MYSQL_PASSWORD: secret
38-
MYSQL_DATABASE: laravel_query_builder
39-
MYSQL_ROOT_PASSWORD: secretroot
40-
ports:
41-
- 3306
42-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
os: [ubuntu-latest]
22+
php: [8.3, 8.2]
23+
laravel: ['10.*', '11.*', '12.*']
24+
stability: [prefer-stable]
25+
include:
26+
- laravel: 11.*
27+
testbench: 9.*
28+
- laravel: 10.*
29+
testbench: 8.*
30+
- laravel: 12.*
31+
testbench: 10.*
4332

44-
redis:
45-
image: redis
46-
ports:
47-
- 6379:6379
48-
options: >-
49-
--health-cmd "redis-cli ping"
50-
--health-interval 10s
51-
--health-timeout 5s
52-
--health-retries 5
33+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
5334

54-
steps:
55-
- name: Checkout code
56-
uses: actions/checkout@v4
35+
services:
36+
mysql:
37+
image: mysql:8.0
38+
env:
39+
MYSQL_USER: user
40+
MYSQL_PASSWORD: secret
41+
MYSQL_DATABASE: laravel_query_builder
42+
MYSQL_ROOT_PASSWORD: secretroot
43+
ports:
44+
- 3306
45+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
46+
redis:
47+
image: redis
48+
ports:
49+
- 6379:6379
50+
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
5751

58-
- name: Setup PHP
59-
uses: shivammathur/setup-php@v2
60-
with:
61-
php-version: ${{ matrix.php }}
62-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
63-
coverage: none
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v4
6455

65-
- name: Setup problem matchers
66-
run: |
67-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
68-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
56+
- name: Setup PHP
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: ${{ matrix.php }}
60+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
61+
coverage: none
6962

70-
- name: Install dependencies
71-
run: |
72-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
73-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
63+
- name: Setup problem matchers
64+
run: |
65+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
66+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
7467
75-
- name: Execute tests
76-
run: vendor/bin/pest
77-
env:
78-
DB_USERNAME: user
79-
DB_PASSWORD: secret
80-
DB_PORT: ${{ job.services.mysql.ports[3306] }}
81-
REDIS_PORT: 6379
68+
- name: Install dependencies
69+
run: |
70+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
71+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
8272
73+
- name: Execute tests
74+
run: vendor/bin/pest
75+
env:
76+
DB_USERNAME: user
77+
DB_PASSWORD: secret
78+
DB_PORT: ${{ job.services.mysql.ports[3306] }}
79+
REDIS_PORT: 6379

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
],
2222
"require": {
2323
"php": "^8.2",
24-
"illuminate/database": "^10.0|^11.0",
25-
"illuminate/http": "^10.0|^11.0",
26-
"illuminate/support": "^10.0|^11.0",
24+
"illuminate/database": "^10.0|^11.0|^12.0",
25+
"illuminate/http": "^10.0|^11.0|^12.0",
26+
"illuminate/support": "^10.0|^11.0|^12.0",
2727
"spatie/laravel-package-tools": "^1.11"
2828
},
2929
"require-dev": {
3030
"ext-json": "*",
3131
"larastan/larastan": "^2.9",
3232
"mockery/mockery": "^1.4",
33-
"orchestra/testbench": "^7.0|^8.0",
34-
"pestphp/pest": "^2.0",
35-
"phpunit/phpunit": "^10.0",
33+
"orchestra/testbench": "^7.0|^8.0|^10.0",
34+
"pestphp/pest": "^2.0|^3.7",
35+
"phpunit/phpunit": "^10.0|^11.5.3",
3636
"spatie/invade": "^2.0"
3737
},
3838
"autoload": {

0 commit comments

Comments
 (0)