Skip to content

Commit

Permalink
support for laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
timoladoyinbo committed Jun 14, 2024
1 parent 5f03ab2 commit 27c071d
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 29 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1]
laravel: [10.*]
php: [8.1, 8.2, 8.3]
laravel: [10.*, 11.*]
include:
- laravel: 11.*
testbench: ^9.0
- laravel: 10.*
testbench: 8.*
name: P${{ matrix.php }} - L${{ matrix.laravel }}

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
],
"require": {
"php": "^8.1",
"laravel/framework": "^10.0"
"laravel/framework": "^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^10.0|^11.0",
"spatie/test-time": "^1.3"
},
"autoload": {
Expand Down
46 changes: 24 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
<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/11.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
<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" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
</phpunit>

0 comments on commit 27c071d

Please sign in to comment.