Skip to content

Commit

Permalink
Add Laravel 11 support (#34)
Browse files Browse the repository at this point in the history
* Add Laravel 11 support
  • Loading branch information
Robert Allport authored Mar 10, 2024
1 parent e6d15c9 commit 2e30e76
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 47 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,26 @@ jobs:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1, 8.0]
laravel: ["^10.0", "^9.0", "^8.12"]
laravel: ["^11.0", "^10.0", "^9.0", "^8.12"]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: "^10.0"
- laravel: ^11.0
testbench: 9.*
- laravel: ^10.0
testbench: 8.*
- laravel: "^9.0"
- laravel: ^9.0
testbench: 7.*
- laravel: "^8.12"
testbench: "^6.23"
- laravel: ^8.12
testbench: ^6.23
exclude:
- laravel: "^10.0"
- laravel: ^10.0
php: 8.0
- laravel: "^8.12"
- laravel: ^8.12
php: 8.3
- laravel: ^11.0
php: 8.1
- laravel: ^11.0
php: 8.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand All @@ -49,5 +55,8 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Display PHP version
run: php -v | grep ^PHP | cut -d' ' -f2

- name: Execute tests
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A simple package allowing for consistent API responses throughout your Laravel a
## Requirements

- PHP `^8.0`
- Laravel `^8.12`, `^9.0` or `^10.0`
- Laravel `^8.12`, `^9.0`, `^10.0` or `^11.0`

### Legacy Support

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.12|^9.0|^10.0"
"illuminate/support": "^8.12|^9.0|^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^6.23|^7.0|^8.0",
"phpunit/phpunit": "^9.4"
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.4|^10.1"
},
"autoload": {
"psr-4": {
Expand Down
50 changes: 14 additions & 36 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 2e30e76

Please sign in to comment.