Skip to content

Commit 66f4b8c

Browse files
committed
Requires PHP 8.1+ ; Updated dependencies + fixes
1 parent 6a8d65f commit 66f4b8c

File tree

15 files changed

+226
-194
lines changed

15 files changed

+226
-194
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
php-version: ["8.0", "8.1", "8.2", "8.3"]
26+
php-version: ["8.1", "8.2", "8.3", "8.4"]
2727
experimental: [false]
2828
os: [ubuntu-latest]
2929
coverage-extension: [pcov]
@@ -50,7 +50,7 @@ jobs:
5050
- name: Run all tests
5151
run: make qa
5252
- name: Send coverage
53-
uses: codecov/codecov-action@v3
53+
uses: codecov/codecov-action@v5
5454
with:
5555
flags: php-${{ matrix.php-version }}-${{ matrix.os }}
5656
name: php-${{ matrix.php-version }}-${{ matrix.os }}

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ endif
170170
deps: ensuretarget
171171
rm -rf ./vendor/*
172172
($(COMPOSER) install -vvv --no-interaction)
173-
curl --silent --show-error --fail --location --output ./vendor/phpstan.phar https://github.com/phpstan/phpstan/releases/download/1.10.41/phpstan.phar \
173+
curl --silent --show-error --fail --location --output ./vendor/phpstan.phar https://github.com/phpstan/phpstan/releases/download/2.0.4/phpstan.phar \
174174
&& chmod +x ./vendor/phpstan.phar
175175

176176
# Generate source code documentation
@@ -212,8 +212,8 @@ endif
212212
.PHONY: lint
213213
lint:
214214
./vendor/bin/phpcs --ignore="./vendor/" --standard=phpcs.xml src test
215-
./vendor/bin/phpmd src text codesize,unusedcode,naming,design --exclude vendor
216-
./vendor/bin/phpmd test text unusedcode,naming,design
215+
./vendor/bin/phpmd src text codesize,unusedcode,naming,design --exclude */vendor/*
216+
./vendor/bin/phpmd test text unusedcode,naming,design --exclude */vendor/*
217217
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse
218218

219219
# Run all tests and reports
@@ -261,7 +261,7 @@ tag:
261261
.PHONY: test
262262
test:
263263
cp phpunit.xml.dist phpunit.xml
264-
./vendor/bin/phpunit --migrate-configuration || true
264+
#./vendor/bin/phpunit --migrate-configuration || true
265265
XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test
266266

267267
# Remove all installed files

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.4
1+
4.2.5

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=8.0",
21+
"php": ">=8.1",
2222
"ext-date": "*",
2323
"ext-zlib": "*",
2424
"tecnickcom/tc-lib-color": "^2.2",
2525
"tecnickcom/tc-lib-pdf-encrypt": "^2.1"
2626
},
2727
"require-dev": {
28-
"pdepend/pdepend": "2.13.0",
29-
"phpmd/phpmd": "2.13.0",
30-
"phpunit/phpunit": "10.1.2 || 9.6.13",
31-
"squizlabs/php_codesniffer": "3.7.2"
28+
"pdepend/pdepend": "2.16.2",
29+
"phpmd/phpmd": "2.15.0",
30+
"phpunit/phpunit": "11.5.2 || 10.5.40",
31+
"squizlabs/php_codesniffer": "3.11.2"
3232
},
3333
"autoload": {
3434
"psr-4": {

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33
paths:
44
- src
55
- test
6-
scanDirectories:
6+
excludePaths:
77
- vendor
88
ignoreErrors:
99
reportUnmatchedIgnoredErrors: false

phpunit.xml.dist

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
43
bootstrap="vendor/autoload.php"
54
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
5+
displayDetailsOnTestsThatTriggerDeprecations="true"
6+
displayDetailsOnTestsThatTriggerErrors="true"
7+
displayDetailsOnTestsThatTriggerNotices="true"
8+
displayDetailsOnTestsThatTriggerWarnings="true"
9+
displayDetailsOnPhpunitDeprecations="true"
910
processIsolation="false"
10-
stopOnFailure="false"
11-
verbose="true">
11+
stopOnFailure="false">
1212
<testsuites>
1313
<testsuite name="tc-lib-pdf-page Test Suite">
1414
<directory>./test</directory>
1515
</testsuite>
1616
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix="php">src</directory>
20-
</whitelist>
21-
</filter>
17+
<source>
18+
<include>
19+
<directory suffix=".php">src</directory>
20+
</include>
21+
</source>
22+
<coverage>
23+
<report>
24+
<clover outputFile="target/coverage/coverage.xml"/>
25+
<html outputDirectory="target/coverage" lowUpperBound="50" highLowerBound="90"/>
26+
</report>
27+
</coverage>
2228
<logging>
23-
<log type="coverage-html" target="target/coverage"/>
24-
<log type="coverage-clover" target="target/coverage/coverage.xml"/>
25-
<log type="junit" target="target/logs/junit.xml"/>
29+
<junit outputFile="target/logs/junit.xml"/>
2630
</logging>
2731
</phpunit>

resources/debian/compat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9
1+
10

resources/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
1010
Package: ~#PKGNAME#~
1111
Provides: php-~#PROJECT#~
1212
Architecture: all
13-
Depends: php (>= 8.0.0), php-date, php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.2.6), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.9), ${misc:Depends}
13+
Depends: php (>= 8.1.0), php-date, php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.2.7), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.10), ${misc:Depends}
1414
Description: PHP PDF Page Library
1515
PHP library containing PDF page formats and definitions.

resources/rpm/rpm.spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
1616
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
1717
BuildArch: noarch
1818

19-
Requires: php(language) >= 8.0.0
19+
Requires: php(language) >= 8.1.0
2020
Requires: php-date
2121
Requires: php-zlib
2222
Requires: php-composer(%{c_vendor}/tc-lib-color) < 3.0.0
23-
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.2.6
23+
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.2.7
2424
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
25-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.9
25+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.10
2626

2727
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
2828
Provides: php-%{gh_project} = %{version}

src/Box.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ protected function getBox(array $dims): string
347347
* 'bci': PageBci,
348348
* }> $dims Array of page dimensions.
349349
*
350-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
350+
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
351351
*/
352352
protected function getBoxColorInfo(array $dims): string
353353
{

0 commit comments

Comments
 (0)