Skip to content

Commit c9a0e2e

Browse files
committed
Update supported php versions and phpunit
1 parent 5a2e7f2 commit c9a0e2e

File tree

6 files changed

+43
-29
lines changed

6 files changed

+43
-29
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ jobs:
77
strategy:
88
matrix:
99
php:
10-
- 8.0
1110
- 8.1
1211
- 8.2
1312
- 8.3

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/.idea/
44

5-
/.phpunit.result.cache
5+
/.phpunit.cache/
66

77
/composer.lock
88

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Best composer dependencies compatibility: allow more versions
1717

1818
## Removed
19-
- php 7.4 support
19+
- php 7.4 and 8.0 support
2020

2121
## [0.0.14] - 2021-02-02
2222
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"require-dev": {
3636
"helmich/phpunit-psr7-assert": "^4",
3737
"nyholm/psr7": "^1.2",
38-
"phpunit/phpunit": "^9.0"
38+
"phpunit/phpunit": "^10.0|^11.0"
3939
},
4040
"suggest": {
4141
"doctrine/orm": "^2.7",

phpunit.xml.dist

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
3-
<coverage processUncoveredFiles="true">
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
<report>
8-
<html outputDirectory="_coverage" lowUpperBound="70" highLowerBound="99"/>
9-
<text outputFile="php://stdout"/>
10-
</report>
11-
</coverage>
12-
<php>
13-
<ini name="error_reporting" value="E_ALL"/>
14-
</php>
15-
<testsuite name="">
16-
<directory>tests/</directory>
17-
</testsuite>
18-
<logging/>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory=".phpunit.cache"
6+
executionOrder="depends,defects"
7+
requireCoverageMetadata="false"
8+
beStrictAboutCoverageMetadata="true"
9+
beStrictAboutOutputDuringTests="true"
10+
displayDetailsOnPhpunitDeprecations="true"
11+
failOnPhpunitDeprecation="true"
12+
failOnRisky="true"
13+
failOnWarning="true">
14+
<testsuites>
15+
<testsuite name="default">
16+
<directory>tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
21+
<include>
22+
<directory>src</directory>
23+
</include>
24+
</source>
25+
26+
27+
<coverage includeUncoveredFiles="true">
28+
<report>
29+
<html outputDirectory="_coverage" lowUpperBound="70" highLowerBound="99"/>
30+
<text outputFile="php://stdout"/>
31+
</report>
32+
</coverage>
33+
1934
</phpunit>

tests/FreeElephants/JsonApiToolkit/JsonApi/Request/Route/RouteFactoryTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public function testCreateCorrect(string $path, RouteRulesProvider $routeRulesPr
1919
$this->assertTrue(is_a($actual, $expected));
2020
}
2121

22-
public function correctDataProvider()
22+
public static function correctDataProvider(): array
2323
{
24-
$routeRulesProviderWithoutApiVersion = $this->getRouteRulesProviderWithoutApiVersion();
25-
$routeRulesProviderWithApiVersion = $this->getRouteRulesProviderWithApiVersion();
24+
$routeRulesProviderWithoutApiVersion = self::getRouteRulesProviderWithoutApiVersion();
25+
$routeRulesProviderWithApiVersion = self::getRouteRulesProviderWithApiVersion();
2626
$uuid = Uuid::uuid4()->toString();
2727

2828
return [
@@ -49,10 +49,10 @@ public function testCreateIncorrect(string $path, RouteRulesProvider $routeRules
4949
$factory->create($path);
5050
}
5151

52-
public function incorrectDataProvider()
52+
public static function incorrectDataProvider(): array
5353
{
54-
$routeRulesProviderWithoutApiVersion = $this->getRouteRulesProviderWithoutApiVersion();
55-
$routeRulesProviderWithApiVersion = $this->getRouteRulesProviderWithApiVersion();
54+
$routeRulesProviderWithoutApiVersion = self::getRouteRulesProviderWithoutApiVersion();
55+
$routeRulesProviderWithApiVersion = self::getRouteRulesProviderWithApiVersion();
5656
$uuid = Uuid::uuid4()->toString();
5757

5858
return [
@@ -91,7 +91,7 @@ private function getMappingProvider(): MappingConfigProvider
9191
);
9292
}
9393

94-
private function getRouteRulesProviderWithoutApiVersion(): RouteRulesProvider
94+
private static function getRouteRulesProviderWithoutApiVersion(): RouteRulesProvider
9595
{
9696
$resourceRegex = '([a-z][A-Za-z\d]+)';
9797
$hexRegex = '[\da-f]';
@@ -108,7 +108,7 @@ private function getRouteRulesProviderWithoutApiVersion(): RouteRulesProvider
108108
);
109109
}
110110

111-
private function getRouteRulesProviderWithApiVersion(): RouteRulesProvider
111+
private static function getRouteRulesProviderWithApiVersion(): RouteRulesProvider
112112
{
113113
$versionRegex = '(v\d+)';
114114
$resourceRegex = '([a-z][A-Za-z\d]+)';

0 commit comments

Comments
 (0)