Skip to content

Commit ed6f7b9

Browse files
committed
Requires PHP 8.1+ ; Updated all dependencies + fixes
1 parent 5fef3eb commit ed6f7b9

File tree

14 files changed

+109
-76
lines changed

14 files changed

+109
-76
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-
3.0.14
1+
3.0.15

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=8.0",
21+
"php": ">=8.1",
2222
"ext-pcre": "*",
2323
"tecnickcom/tc-lib-pdf-filter": "^2.0"
2424
},
2525
"require-dev": {
26-
"pdepend/pdepend": "2.13.0",
27-
"phpmd/phpmd": "2.13.0",
28-
"phpunit/phpunit": "10.1.2 || 9.6.13",
29-
"squizlabs/php_codesniffer": "3.7.2"
26+
"pdepend/pdepend": "2.16.2",
27+
"phpmd/phpmd": "2.15.0",
28+
"phpunit/phpunit": "11.5.2 || 10.5.40",
29+
"squizlabs/php_codesniffer": "3.11.2"
3030
},
3131
"autoload": {
3232
"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-parser 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-tecnickcom-tc-lib-pdf-filter (<< 2.0.0), php-tecnickcom-tc-lib-pdf-filter (>= 2.0.17), ${misc:Depends}
13+
Depends: php (>= 8.1.0), php-tecnickcom-tc-lib-pdf-filter (<< 2.0.0), php-tecnickcom-tc-lib-pdf-filter (>= 2.0.18), ${misc:Depends}
1414
Description: PHP PDF Parser Library
1515
PHP library to parse PDF documents.

resources/rpm/rpm.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ 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-composer(%{c_vendor}/tc-lib-pdf-filter) < 2.0.0
21-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 2.0.17
21+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 2.0.18
2222
Requires: php-pcre
2323

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

src/Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
3333
* @link https://github.com/tecnickcom/tc-lib-pdf-parser
3434
*
35-
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
35+
* @SuppressWarnings("PHPMD.ExcessiveClassComplexity")
3636
*
3737
* @phpstan-import-type RawObjectArray from \Com\Tecnick\Pdf\Parser\Process\RawObject
3838
*/
@@ -230,7 +230,7 @@ protected function getObjectVal(array $obj): array
230230
* 1: array<string>,
231231
* } Decoded stream data and remaining filters.
232232
*
233-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
233+
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
234234
*/
235235
protected function decodeStream(array $sdic, string $stream): array
236236
{

0 commit comments

Comments
 (0)