Skip to content

Commit 44d754a

Browse files
committed
Requires PHP 8.1+ ; Updated dependencies + fixes
1 parent 5ab3b65 commit 44d754a

File tree

21 files changed

+74
-91
lines changed

21 files changed

+74
-91
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-
2.0.17
1+
2.0.18

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
}
2020
],
2121
"require": {
22-
"php": ">=8.0",
22+
"php": ">=8.1",
2323
"ext-mbstring": "*",
2424
"ext-pcre": "*",
2525
"tecnickcom/tc-lib-unicode-data": "^2.0"
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-unicode 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-mbstring, php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.17), ${misc:Depends}
13+
Depends: php (>= 8.1.0), php-mbstring, php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.18), ${misc:Depends}
1414
Description: PHP Unicode methods.
1515
PHP library containing Unicode methods.

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-unicode-data) < 3.0.0
21-
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.17
21+
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.18
2222
Requires: php-pcre
2323
Requires: php-mbstring
2424

src/Bidi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function __construct(
159159
* @param ?array<int> $ordarr Array of UTF-8 codepoints (if empty it will be generated from $str or $chrarr)
160160
* @param string $forcedir If 'R' forces RTL, if 'L' forces LTR
161161
*
162-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
162+
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
163163
*/
164164
protected function setInput(
165165
?string $str = null,
@@ -272,7 +272,7 @@ protected function getParagraphs(): array
272272
/**
273273
* Process the string
274274
*
275-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
275+
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
276276
*/
277277
protected function process(): void
278278
{

0 commit comments

Comments
 (0)