Skip to content

Commit

Permalink
Merge pull request #287 from codedge/laravel11
Browse files Browse the repository at this point in the history
Add Laravel 11
  • Loading branch information
codedge authored Jan 11, 2025
2 parents 9319768 + 6dfc69f commit d1e6bff
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 38 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ jobs:

strategy:
matrix:
php: ['8.1', '8.2']
laravel: ['9.*', '10.*', '11.*']
php: ['8.3', '8.4']
laravel: [10.*, 11.*]
dependency-version: [prefer-stable]
include:
- laravel: 11.*
- testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: '8.1'

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

steps:
Expand All @@ -38,7 +32,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
env:
APP_ENV: testing

Expand All @@ -51,7 +45,7 @@ jobs:
name: Push coverage to codecov
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./clover.xml
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
fail_ci_if_error: false
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"source": "https://github.com/codedge/laravel-fpdf"
},
"require": {
"php": "^8.1",
"illuminate/support": "^9.0 || ^10.0 || ^11.0"
"php": "~8.3 || ~8.4",
"illuminate/support": "^10.0 || ^11.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.39",
"orchestra/testbench": "^7.35.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^9.6.0 || ^10.5"
"orchestra/testbench": "^8.0 || ^9.0",
"phpunit/phpunit": "^10.5"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down Expand Up @@ -55,6 +55,6 @@
}
},
"scripts": {
"test": "phpunit"
"test": "phpunit --coverage-clover coverage.xml"
}
}
20 changes: 5 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">

Expand All @@ -16,14 +11,9 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src/Facades</directory>
<directory suffix=".php">src/Fpdf</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-clover" target="clover.xml"/>
</logging>
<source>
<include>
<directory>./src</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/FpdfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class FpdfTest extends TestCase
{
protected $fpdf;
protected Fpdf $fpdf;

public function setUp(): void
{
Expand Down
4 changes: 0 additions & 4 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

abstract class TestCase extends Orchestra
{
/**
* @param \Illuminate\Foundation\Application $app
* @return array|string[]
*/
protected function getPackageProviders($app)
{
return [
Expand Down

0 comments on commit d1e6bff

Please sign in to comment.