Skip to content

Commit

Permalink
feat: Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nerg4l committed May 19, 2024
1 parent d442d03 commit d4a8a06
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 32 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 8.0, 8.1, 8.2 ]
laravel: [ '^9.0', '^10.0' ]
php: [ 8.0, 8.1, 8.2, 8.3 ]
laravel: [ '^9.0', '^10.0', '^11.0' ]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.0
laravel: '^10.0'
- laravel: '^9.0'
php: 8.3
- laravel: '^10.0'
php: 8.0
- laravel: '^11.0'
php: 8.0
- laravel: '^11.0'
php: 8.1

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand All @@ -29,10 +35,10 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
],
"require": {
"php": "^8.0",
"illuminate/support": "^9.0 || ^10.0",
"illuminate/http": "^9.0 || ^10.0"
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
"illuminate/http": "^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.3 || ^8.0",
"phpunit/phpunit": "^9.5"
"orchestra/testbench": "^7.3 || ^8.0 || ^9.0",
"phpunit/phpunit": "^9.5 || ^10.5"
},
"autoload": {
"psr-4": {
Expand Down
41 changes: 19 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Laravel Upload Handler Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
<text outputFile="build/coverage.txt"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Laravel Upload Handler Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
24 changes: 24 additions & 0 deletions phpunit.xml.dist.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Laravel Upload Handler Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
<text outputFile="build/coverage.txt"/>
</logging>
</phpunit>

0 comments on commit d4a8a06

Please sign in to comment.