Skip to content

Commit 3f9e80b

Browse files
Add support for Laravel 13 (#33)
* Add Laravel 13 support * Update CI * Update CI * Update CI * Simplify CI * Add more Pest versions * Add more PHPUnit versions * Exclude PHP versions * PHPUnit config * More CI things * disbale code coverage
1 parent 6f63e2a commit 3f9e80b

4 files changed

Lines changed: 32 additions & 54 deletions

File tree

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.2'
19+
php-version: '8.4'
2020
coverage: none
2121

2222
- name: Install composer dependencies

.github/workflows/run-tests.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,27 @@ jobs:
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
os: [ubuntu-latest, windows-latest]
19-
php: [8.2, 8.1]
20-
laravel: ['10.*', '11.*', '12.*']
21-
stability: [prefer-lowest, prefer-stable]
18+
os: [ubuntu-latest]
19+
php: [8.5, 8.4, 8.3, 8.2]
20+
laravel: ['10.*', '11.*', '12.*', '13.*']
2221
include:
22+
- laravel: 13.*
23+
testbench: 11.*
2324
- laravel: 12.*
2425
testbench: 10.*
2526
- laravel: 11.*
2627
testbench: 9.*
2728
- laravel: 10.*
2829
testbench: 8.*
2930
exclude:
30-
- php: 8.1
31-
laravel: 12.*
32-
- php: 8.1
33-
laravel: 11.*
34-
- php: 8.0
31+
- php: 8.5
3532
laravel: 11.*
33+
- php: 8.5
34+
laravel: 10.*
35+
- php: 8.2
36+
laravel: 13.*
3637

37-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
38+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
3839

3940
steps:
4041
- name: Checkout code
@@ -55,7 +56,7 @@ jobs:
5556
- name: Install dependencies
5657
run: |
5758
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
59+
composer update --prefer-dist --no-interaction
5960
6061
- name: Execute tests
6162
run: vendor/bin/pest

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
"require": {
1919
"php": "^8.1",
2020
"spatie/laravel-package-tools": "^1.9.2",
21-
"illuminate/contracts": "^10.0|^11.0|^12.0"
21+
"illuminate/contracts": "^10.0|^11.0|^12.0|^13.0"
2222
},
2323
"require-dev": {
2424
"nunomaduro/collision": "^7.0|^8.0",
2525
"nunomaduro/larastan": "^2.0|^3.0",
26-
"orchestra/testbench": "^8.0|^9.0|^10.0",
27-
"pestphp/pest": "^2.0|^3.7",
28-
"pestphp/pest-plugin-laravel": "^2.0|^3.1",
26+
"orchestra/testbench": "^8.0|^9.0|^10.0|^11.0",
27+
"pestphp/pest": "^2.0|^3.7|^4.1",
28+
"pestphp/pest-plugin-laravel": "^2.0|^3.1|^v4.1.0",
2929
"phpstan/extension-installer": "^1.1",
3030
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
3131
"phpstan/phpstan-phpunit": "^1.0|^2.0",
32-
"phpunit/phpunit": "^10.0|^11.5.3",
32+
"phpunit/phpunit": "^10.0|^11.5.3|^12.0",
3333
"spatie/laravel-ray": "^1.26"
3434
},
3535
"autoload": {

phpunit.xml.dist

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
executionOrder="random"
15-
failOnWarning="true"
16-
failOnRisky="true"
17-
failOnEmptyTestSuite="true"
18-
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
21-
<testsuites>
22-
<testsuite name="RyanChandler Test Suite">
23-
<directory>tests</directory>
24-
</testsuite>
25-
</testsuites>
26-
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
30-
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
34-
</report>
35-
</coverage>
36-
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
38-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<testsuites>
4+
<testsuite name="RyanChandler Test Suite">
5+
<directory>tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<logging>
9+
<junit outputFile="build/report.junit.xml"/>
10+
</logging>
11+
<source>
12+
<include>
13+
<directory suffix=".php">./src</directory>
14+
</include>
15+
</source>
3916
</phpunit>

0 commit comments

Comments
 (0)