Skip to content

Commit 1e8308d

Browse files
committed
Add support for Laravel 12
1 parent 20dc853 commit 1e8308d

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

.github/workflows/main.yml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
1-
name: Run Tests
2-
on: [push]
1+
name: run-tests
2+
3+
on:
4+
- push
5+
- pull_request
36

47
jobs:
5-
run:
6-
runs-on: ubuntu-latest
7-
strategy:
8-
max-parallel: 15
9-
fail-fast: false
10-
matrix:
11-
php-versions: ['7.3', '7.4', '8.0', 8.1]
12-
composer-flags: ['--prefer-lowest', '--prefer-stable']
13-
env:
14-
- LARAVEL_VERSION='^7.0' TESTBENCH_VERSION='^5.0'
15-
- LARAVEL_VERSION='^8.0' TESTBENCH_VERSION='^6.0'
16-
- LARAVEL_VERSION='^9.0' TESTBENCH_VERSION='^7.0'
17-
name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }}
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@master
21-
- name: Install PHP
22-
uses: shivammathur/setup-php@master
23-
with:
24-
php-version: ${{ matrix.php-versions }}
25-
- name: Check Environment
26-
run: |
27-
${{ matrix.env }}
28-
php -v
29-
composer -V
30-
php -m
31-
echo "Laravel version ${LARAVEL_VERSION}"
32-
echo "Orchestra Testbench version ${TESTBENCH_VERSION}"
33-
- name: Install Dependencies
34-
run: |
35-
${{ matrix.env }}
36-
composer config discard-changes true
37-
composer self-update
38-
composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update
39-
composer require --dev "orchestra/testbench:${TESTBENCH_VERSION}" --no-interaction --no-update
40-
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction
41-
- name: Run PHPUnit
42-
run: php vendor/bin/phpunit
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
php: [8.4, 8.3, 8.2]
16+
laravel: [^12.0, ^10.0, ^11.0]
17+
dependency-version: [prefer-lowest, prefer-stable]
18+
include:
19+
- laravel: ^10.0
20+
testbench: ^8.0
21+
- laravel: ^11.0
22+
testbench: ^9.0
23+
- laravel: ^12.0
24+
testbench: ^10.0
25+
26+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
37+
coverage: none
38+
39+
- name: Install dependencies
40+
run: |
41+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
42+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
43+
44+
- name: Execute tests
45+
run: vendor/bin/phpunit

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":[],"times":{"ImLiam\\BladeHelper\\Tests\\Unit\\BladeHelperTest::custom_named_helpers_compile_correctly":0.104,"ImLiam\\BladeHelper\\Tests\\Unit\\BladeHelperTest::custom_unnamed_helpers_compile_correctly":0.003,"ImLiam\\BladeHelper\\Tests\\Unit\\BladeHelperTest::custom_helpers_without_echo_compile_correctly":0.002,"ImLiam\\BladeHelper\\Tests\\Unit\\BladeHelperTest::custom_helper_callbacks_compile_correctly":0.003,"ImLiam\\BladeHelper\\Tests\\Unit\\BladeHelperTest::custom_if_helpers_can_be_registered":0.003}}

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^7.3|^8.0",
22-
"illuminate/support": "^7.0|^8.0|^9.0|^10.0"
21+
"php": "^8.0",
22+
"illuminate/support": "^10.0|^11.0|^12.0"
2323
},
2424
"require-dev": {
2525
"phpunit/phpunit": "^7.0|^8.0|^9.0",
2626
"larapack/dd": "^1.0",
27-
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
27+
"orchestra/testbench": "^8.0|^9.0|^10.0",
2828
"mockery/mockery": "^1.0"
2929
},
3030
"autoload": {

0 commit comments

Comments
 (0)