Skip to content

Commit 26299d9

Browse files
Laravel 11.x Compatibility (#28)
* Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 --------- Co-authored-by: Cesar <cesargb@gmail.com>
1 parent 9b317b0 commit 26299d9

File tree

3 files changed

+69
-63
lines changed

3 files changed

+69
-63
lines changed

.github/workflows/tests.yml

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
11
name: tests
22

3-
on: [push, pull_request]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
6-
run-tests:
7-
runs-on: ubuntu-latest
8-
strategy:
9-
fail-fast: false
10-
matrix:
11-
php: [8.3, 8.2, 8.1, 8.0]
12-
laravel: [10.*, 9.*]
13-
dependency-version: [prefer-stable]
14-
include:
15-
- laravel: 9.*
16-
testbench: 7.*
17-
- laravel: 10.*
18-
testbench: 8.*
19-
exclude:
20-
- laravel: 10.*
21-
php: 8.0
22-
23-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
24-
25-
steps:
26-
- name: Checkout code
27-
uses: actions/checkout@v4
28-
29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: ${{ matrix.php }}
33-
extensions: pdo, sqlite, pdo_sqlite
34-
coverage: none
35-
36-
- name: Install dependencies
37-
run: |
38-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
39-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
40-
41-
- name: Execute tests
42-
run: vendor/bin/phpunit
8+
run-tests:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [8.3, 8.2, 8.1, 8.0]
15+
laravel: ['9.*', '10.*', '11.*']
16+
dependency-version: [prefer-stable]
17+
include:
18+
- laravel: 9.*
19+
testbench: 7.*
20+
- laravel: 10.*
21+
testbench: 8.*
22+
- laravel: 11.*
23+
testbench: 9.*
24+
exclude:
25+
- laravel: 10.*
26+
php: 8.0
27+
- laravel: 11.*
28+
php: 8.1
29+
- laravel: 11.*
30+
php: 8.0
31+
32+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: ${{ matrix.php }}
42+
extensions: pdo, sqlite, pdo_sqlite
43+
coverage: none
44+
45+
- name: Install dependencies
46+
run: |
47+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
48+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
49+
50+
- name: Execute tests
51+
run: vendor/bin/phpunit
52+
env:
53+
XDEBUG_MODE: coverage

composer.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"type": "library",
1414
"require": {
1515
"php": "^8.0",
16-
"illuminate/console": "^9.0|^10.0",
17-
"illuminate/database": "^9.0|^10.0",
18-
"illuminate/events": "^9.0|^10.0",
19-
"illuminate/support": "^9.0|^10.0"
16+
"illuminate/console": "^9.0|^10.0|^11.0",
17+
"illuminate/database": "^9.0|^10.0|^11.0",
18+
"illuminate/events": "^9.0|^10.0|^11.0",
19+
"illuminate/support": "^9.0|^10.0|^11.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^9.0",
23-
"orchestra/testbench": "^7.0|^8.0",
22+
"phpunit/phpunit": "^9.0|^10.5",
23+
"orchestra/testbench": "^7.0|^8.0|^9.0",
2424
"laravel/legacy-factories": "^1.0.4",
2525
"friendsofphp/php-cs-fixer": "^3.13",
2626
"nunomaduro/larastan": "^2.3"
@@ -46,12 +46,12 @@
4646
}
4747
],
4848
"extra": {
49-
"laravel": {
50-
"providers": [
51-
"Cesargb\\Database\\Support\\CascadeDeleteServiceProvider"
52-
]
53-
}
54-
},
55-
"minimum-stability": "dev",
56-
"prefer-stable": true
49+
"laravel": {
50+
"providers": [
51+
"Cesargb\\Database\\Support\\CascadeDeleteServiceProvider"
52+
]
53+
}
54+
},
55+
"minimum-stability": "dev",
56+
"prefer-stable": true
5757
}

phpunit.xml.dist

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
<report>
8-
<clover outputFile="build/logs/clover.xml"/>
9-
<html outputDirectory="build/coverage"/>
10-
<text outputFile="build/coverage.txt"/>
11-
</report>
12-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
133
<php>
144
<env name="DB_CONNECTION" value="testing"/>
155
</php>
@@ -21,4 +11,9 @@
2111
<logging>
2212
<junit outputFile="build/report.junit.xml"/>
2313
</logging>
14+
<source>
15+
<include>
16+
<directory suffix=".php">src/</directory>
17+
</include>
18+
</source>
2419
</phpunit>

0 commit comments

Comments
 (0)