Skip to content

Commit 0c04058

Browse files
committed
Merge branch 'release/4.0.2'
2 parents 6dfb417 + 4e2b61b commit 0c04058

File tree

6 files changed

+43
-8
lines changed

6 files changed

+43
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-version: [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php-version }}
19+
20+
- uses: php-actions/composer@v6
21+
with:
22+
php_version: ${{ matrix.php-version }}
23+
24+
- name: Run PHPUnit tests
25+
run: vendor/bin/phpunit
26+
27+
- uses: php-actions/phpstan@v3
28+
with:
29+
path: src/
30+
php_version: ${{ matrix.php-version }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## [4.0.2] - 2024-10-13
8+
### Changed
9+
- Updated dompdf library to 3.x
10+
711
## [4.0.1] - 2023-11-10
812
### Fixed
913
- Issue with total page count not being replaced for some font families

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@
2626
},
2727
"require": {
2828
"php": "^7.4|^8",
29-
"dompdf/dompdf": "^2.0",
29+
"dompdf/dompdf": "^2.0|^3.0",
3030
"setasign/fpdi": "^2.0",
3131
"tecnickcom/tcpdf": "^6.4"
3232
},
3333
"require-dev": {
34-
"phpunit/phpunit": "^9",
34+
"phpunit/phpunit": "^9|^10|^11",
3535
"phpstan/phpstan": "^1.8",
36-
"phpstan/phpstan-phpunit": "^1.1",
37-
"roave/backward-compatibility-check": "^7.0"
36+
"phpstan/phpstan-phpunit": "^1.1"
3837
},
3938
"suggest": {
4039
"vianetz/signaturportal-api": "Use this library to sign your generated PDF documents.",
File renamed without changes.
File renamed without changes.

src/Test/PdfTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
final class PdfTest extends TestCase
2929
{
30+
private const TMP_DIR = './tmp_dir/';
31+
3032
private function getDocumentMock(): \Vianetz\Pdf\Model\Document
3133
{
3234
/** @var \Vianetz\Pdf\Model\Document $document */
@@ -47,7 +49,7 @@ public function tearDown(): void
4749

4850
// Remove debug file if existent
4951
@unlink(\Vianetz\Pdf\Model\Generator\AbstractGenerator::DEBUG_FILE_NAME);
50-
@rmdir('./tmp/');
52+
@rmdir(self::TMP_DIR);
5153
}
5254

5355
public function testAddOneDocumentIncreasesDocumentCounterByOne(): void
@@ -103,15 +105,15 @@ public function testConfigTempDirMayNotBeNull(): void
103105

104106
public function testNoExceptionIfTempDirNotWritable(): void
105107
{
106-
@mkdir('./tmp', 0000);
108+
@mkdir(self::TMP_DIR, 0000);
107109

108110
$config = new Config();
109-
$config->setTempDir('tmp/');
111+
$config->setTempDir(self::TMP_DIR);
110112

111113
$pdfMock = $this->getPdfMock($config);
112114
$pdfMock->addDocument($this->getDocumentMock())
113115
->render();
114116

115-
$this->assertDirectoryIsNotWritable('tmp/');
117+
$this->assertDirectoryIsNotWritable(self::TMP_DIR);
116118
}
117119
}

0 commit comments

Comments
 (0)