Skip to content

Commit 2addd8d

Browse files
author
itismadness
committed
Update minimum PHP to 8.1
1 parent ea558fc commit 2addd8d

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php-version: ['7.2', '7.3', '7.4', '8.0']
15+
php-version: ['8.1', '8.2']
1616

1717
steps:
1818
- uses: actions/checkout@v2

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
}
1616
},
1717
"require": {
18-
"php": ">=7.2",
18+
"php": ">=8.1",
1919
"ext-mbstring": "*"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^8",
23-
"squizlabs/php_codesniffer": "3.*",
24-
"phpstan/phpstan": "^0.12.48"
22+
"phpunit/phpunit": "^10.4.1",
23+
"squizlabs/php_codesniffer": "^3.7.2",
24+
"phpstan/phpstan": "^1.10.38"
2525
},
2626
"scripts": {
2727
"test": "phpunit",

phpunit.xml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.5/phpunit.xsd"
3-
colors="true"
4-
bootstrap="vendor/autoload.php">
5-
<testsuites>
6-
<testsuite name="unit">
7-
<directory>tests</directory>
8-
</testsuite>
9-
</testsuites>
10-
<filter>
11-
<whitelist processUncoveredFilesFromWhitelist="true">
12-
<directory suffix=".php">src</directory>
13-
<exclude />
14-
</whitelist>
15-
</filter>
16-
<logging>
17-
<log type="coverage-html" target="report" />
18-
</logging>
19-
</phpunit>
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" colors="true" bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache">
3+
<coverage>
4+
<report>
5+
<html outputDirectory="report"/>
6+
</report>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="unit">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
<logging/>
14+
<source>
15+
<include>
16+
<directory suffix=".php">src</directory>
17+
</include>
18+
<exclude/>
19+
</source>
20+
</phpunit>

tests/BencodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class BencodeTest extends \PHPUnit\Framework\TestCase
88
{
9-
public function dataProvider(): array
9+
public static function dataProvider(): array
1010
{
1111
return [
1212
['i0e', 0],
@@ -47,7 +47,7 @@ public function testInvalidDictionaryKey(): void
4747
$bencode->decodeString('di1e5:valuee');
4848
}
4949

50-
public function invalidIntegers(): array
50+
public static function invalidIntegers(): array
5151
{
5252
return [['-0'], ['a'], ['1.0']];
5353
}

0 commit comments

Comments
 (0)