Skip to content

Commit 21a5cc2

Browse files
authored
Bump dev dependencies; update to PHPUnit 10 (#53)
1 parent ea613f2 commit 21a5cc2

39 files changed

+421
-280
lines changed

.github/workflows/php.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
run: composer update --ignore-platform-reqs --prefer-dist --no-progress
7575

7676
- name: Run PHPUnit tests
77+
if: matrix.php-versions != env.code-coverage-version
78+
run: composer run-script phpunit -- --no-coverage
79+
80+
- name: Run PHPUnit tests with coverage
81+
if: matrix.php-versions == env.code-coverage-version
7782
run: composer run-script phpunit
7883

7984
- name: Run PHPStan

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
},
3434
"require-dev": {
3535
"httpwg/structured-field-tests": "*@dev",
36-
"paragonie/constant_time_encoding": "^2.6.3 || ^3.0.0",
36+
"paragonie/constant_time_encoding": "^3.0.0",
3737
"phpmd/phpmd": "^2.15",
38-
"phpstan/phpstan": "^1.9",
39-
"phpstan/phpstan-phpunit": "^1.3",
40-
"phpunit/phpunit": "^9.5.27",
38+
"phpstan/phpstan": "^1.12",
39+
"phpstan/phpstan-phpunit": "^1.4",
40+
"phpunit/phpunit": "^10.5",
4141
"slevomat/coding-standard": "^8.15",
42-
"squizlabs/php_codesniffer": "^3.7.1"
42+
"squizlabs/php_codesniffer": "^3.11"
4343
},
4444
"config": {
4545
"sort-packages": true,

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ parameters:
1212
- gapple\StructuredFields\Dictionary
1313
- gapple\StructuredFields\Parameters
1414

15+
ignoreErrors:
16+
- message: '#Class gapple\\Tests\\StructuredFields\\Rule has an uninitialized readonly property#'
17+
path: tests/Rule.php

phpunit.xml.dist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<phpunit
43
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
6-
failOnWarning="true"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
6+
failOnWarning="true"
7+
cacheDirectory="tmp/.phpunit.cache"
78
>
89
<testsuites>
910
<testsuite name="structured-fields tests">
1011
<directory>./tests/</directory>
1112
</testsuite>
1213
</testsuites>
13-
14-
<coverage includeUncoveredFiles="true"
15-
processUncoveredFiles="true">
14+
<source>
1615
<include>
1716
<directory suffix=".php">src</directory>
1817
</include>
19-
18+
</source>
19+
<coverage includeUncoveredFiles="true">
2020
<report>
2121
<html outputDirectory="tmp/code-coverage"/>
2222
<clover outputFile="tmp/code-coverage/clover.xml"/>

tests/DateTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
/**
66
* Additional Date parsing and serializing tests.
77
*/
8-
class DateTest extends RulesetTest
8+
class DateTest extends RulesetTestBase
99
{
10-
protected function rulesetDataProvider(): array
10+
use ParsingRulesetTrait;
11+
12+
/**
13+
* {@inheritdoc}
14+
*/
15+
protected static function rulesetDataProvider(): array
1116
{
1217
return [
1318
'date - large int' => [

tests/Httpwg/BinaryTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace gapple\Tests\StructuredFields\Httpwg;
44

5-
class BinaryTest extends HttpwgTest
5+
use gapple\Tests\StructuredFields\ParsingRulesetTrait;
6+
use gapple\Tests\StructuredFields\SerializingRulesetTrait;
7+
8+
class BinaryTest extends HttpwgTestBase
69
{
7-
protected $ruleset = 'binary';
10+
use ParsingRulesetTrait;
11+
use SerializingRulesetTrait;
12+
13+
protected static string $ruleset = 'binary';
814
}

tests/Httpwg/BooleanTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace gapple\Tests\StructuredFields\Httpwg;
44

5-
class BooleanTest extends HttpwgTest
5+
use gapple\Tests\StructuredFields\ParsingRulesetTrait;
6+
use gapple\Tests\StructuredFields\SerializingRulesetTrait;
7+
8+
class BooleanTest extends HttpwgTestBase
69
{
7-
protected $ruleset = 'boolean';
10+
use ParsingRulesetTrait;
11+
use SerializingRulesetTrait;
12+
13+
protected static string $ruleset = 'boolean';
814
}

tests/Httpwg/DateTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace gapple\Tests\StructuredFields\Httpwg;
44

5-
class DateTest extends HttpwgTest
5+
use gapple\Tests\StructuredFields\ParsingRulesetTrait;
6+
use gapple\Tests\StructuredFields\SerializingRulesetTrait;
7+
8+
class DateTest extends HttpwgTestBase
69
{
7-
protected $ruleset = 'date';
10+
use ParsingRulesetTrait;
11+
use SerializingRulesetTrait;
12+
13+
protected static string $ruleset = 'date';
814
}

tests/Httpwg/DictionaryTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace gapple\Tests\StructuredFields\Httpwg;
44

5-
class DictionaryTest extends HttpwgTest
5+
use gapple\Tests\StructuredFields\ParsingRulesetTrait;
6+
use gapple\Tests\StructuredFields\SerializingRulesetTrait;
7+
8+
class DictionaryTest extends HttpwgTestBase
69
{
7-
protected $ruleset = 'dictionary';
10+
use ParsingRulesetTrait;
11+
use SerializingRulesetTrait;
12+
13+
protected static string $ruleset = 'dictionary';
814
}

tests/Httpwg/DisplayStringTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace gapple\Tests\StructuredFields\Httpwg;
44

5-
class DisplayStringTest extends HttpwgTest
5+
use gapple\Tests\StructuredFields\ParsingRulesetTrait;
6+
use gapple\Tests\StructuredFields\SerializingRulesetTrait;
7+
8+
class DisplayStringTest extends HttpwgTestBase
69
{
7-
protected $ruleset = 'display-string';
10+
use ParsingRulesetTrait;
11+
use SerializingRulesetTrait;
12+
13+
protected static string $ruleset = 'display-string';
814
}

0 commit comments

Comments
 (0)