Skip to content

Commit d1e6bff

Browse files
authored
Merge pull request #287 from codedge/laravel11
Add Laravel 11
2 parents 9319768 + 6dfc69f commit d1e6bff

File tree

5 files changed

+18
-38
lines changed

5 files changed

+18
-38
lines changed

.github/workflows/tests.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php: ['8.1', '8.2']
13-
laravel: ['9.*', '10.*', '11.*']
12+
php: ['8.3', '8.4']
13+
laravel: [10.*, 11.*]
1414
dependency-version: [prefer-stable]
1515
include:
16+
- laravel: 11.*
17+
- testbench: 9.*
1618
- laravel: 10.*
1719
testbench: 8.*
18-
- laravel: 9.*
19-
testbench: 7.*
20-
- laravel: 11.*
21-
testbench: 9.*
22-
exclude:
23-
- laravel: 11.*
24-
php: '8.1'
25-
2620
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2721

2822
steps:
@@ -38,7 +32,7 @@ jobs:
3832
- name: Install dependencies
3933
run: |
4034
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
41-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
35+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
4236
env:
4337
APP_ENV: testing
4438

@@ -51,7 +45,7 @@ jobs:
5145
name: Push coverage to codecov
5246
with:
5347
token: ${{ secrets.CODECOV_TOKEN }}
54-
file: ./clover.xml
48+
file: ./coverage.xml
5549
flags: unittests
5650
name: codecov-umbrella
57-
fail_ci_if_error: true
51+
fail_ci_if_error: false

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"source": "https://github.com/codedge/laravel-fpdf"
1919
},
2020
"require": {
21-
"php": "^8.1",
22-
"illuminate/support": "^9.0 || ^10.0 || ^11.0"
21+
"php": "~8.3 || ~8.4",
22+
"illuminate/support": "^10.0 || ^11.0"
2323
},
2424
"require-dev": {
2525
"ergebnis/composer-normalize": "^2.39",
26-
"orchestra/testbench": "^7.35.0 || ^8.0 || ^9.0",
27-
"phpunit/phpunit": "^9.6.0 || ^10.5"
26+
"orchestra/testbench": "^8.0 || ^9.0",
27+
"phpunit/phpunit": "^10.5"
2828
},
2929
"minimum-stability": "dev",
3030
"prefer-stable": true,
@@ -55,6 +55,6 @@
5555
}
5656
},
5757
"scripts": {
58-
"test": "phpunit"
58+
"test": "phpunit --coverage-clover coverage.xml"
5959
}
6060
}

phpunit.xml.dist

+5-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit bootstrap="vendor/autoload.php"
33
backupGlobals="false"
4-
backupStaticAttributes="false"
54
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
105
processIsolation="false"
116
stopOnFailure="false">
127

@@ -16,14 +11,9 @@
1611
</testsuite>
1712
</testsuites>
1813

19-
<filter>
20-
<whitelist>
21-
<directory suffix=".php">src/Facades</directory>
22-
<directory suffix=".php">src/Fpdf</directory>
23-
</whitelist>
24-
</filter>
25-
26-
<logging>
27-
<log type="coverage-clover" target="clover.xml"/>
28-
</logging>
14+
<source>
15+
<include>
16+
<directory>./src</directory>
17+
</include>
18+
</source>
2919
</phpunit>

tests/FpdfTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class FpdfTest extends TestCase
1010
{
11-
protected $fpdf;
11+
protected Fpdf $fpdf;
1212

1313
public function setUp(): void
1414
{

tests/TestCase.php

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
abstract class TestCase extends Orchestra
1111
{
12-
/**
13-
* @param \Illuminate\Foundation\Application $app
14-
* @return array|string[]
15-
*/
1612
protected function getPackageProviders($app)
1713
{
1814
return [

0 commit comments

Comments
 (0)