Skip to content

Commit 24b7220

Browse files
Merge remote-tracking branch 'origin/master' into cleanup
2 parents be3b5ff + 2ac7612 commit 24b7220

File tree

6 files changed

+32
-21
lines changed

6 files changed

+32
-21
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ jobs:
1212
build:
1313
strategy:
1414
matrix:
15-
php: ['8.0', '8.1', '8.2']
16-
phpunit: ['8.0', '9.0', '10.0']
15+
php: ['8.0', '8.1', '8.2', '8.3']
16+
phpunit: ['8.0', '9.0', '10.0', '11.0']
1717
exclude:
1818
- php: '8.0'
1919
phpunit: '10.0'
20+
- php: '8.1'
21+
phpunit: '11.0'
22+
- php: '8.0'
23+
phpunit: '11.0'
2024
runs-on: ubuntu-latest
2125
name: PHP ${{ matrix.php }}, PHPUnit ${{ matrix.phpunit }}
2226

.github/workflows/php_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: 8.0
17+
php-version: 8.3
1818
extensions: mbstring, intl, json
1919
coverage: pcov
2020

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ This library is [MIT-licensed](LICENSE.txt).
2323

2424
There are several release branches of this library, each of these being compatible with different releases of PHPUnit and PHP. The following table should give an easy overview:
2525

26-
| "JSON assertion" version | PHPUnit 4 | PHPUnit 5 | PHPUnit 6 | PHPUnit 7 | PHPUnit 8 | PHPUnit 9 | PHPUnit 10 |
27-
| ------------------------ | --------- | --------- | --------- | --------- | --------- | --------- | ---------- |
28-
| v1 (branch `v1`), **unsupported** | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
29-
| v2 (branch `v2`) | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
30-
| v3 (branch `master`) | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
26+
| "JSON assertion" version | PHPUnit 4 | PHPUnit 5 | PHPUnit 6 | PHPUnit 7 | PHPUnit 8 | PHPUnit 9 | PHPUnit 10 | PHPUnit 11 |
27+
| ------------------------ | --------- | --------- | --------- | --------- | --------- | --------- | ---------- |------------|
28+
| v1 (branch `v1`), **unsupported** | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
29+
| v2 (branch `v2`) | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
30+
| v3 (branch `master`) | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
3131

3232
When you are using `composer require` and have already declared a dependency to `phpunit/phpunit` in your `composer.json` file, Composer should pick latest compatible version automatically.
3333

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"justinrainbow/json-schema": "^5.0"
1515
},
1616
"conflict": {
17-
"phpunit/phpunit": "<8.0 || >= 11.0"
17+
"phpunit/phpunit": "<8.0 || >= 12.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^8.0 || ^9.0 || ^10.0"
20+
"phpunit/phpunit": "^8.0 || ^9.0 || ^10.0 || ^11.0"
2121
},
2222
"autoload": {
2323
"psr-4": {

phpunit.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
<?xml version="1.0"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
55
bootstrap="vendor/autoload.php"
66
colors="true"
77
timeoutForSmallTests="1"
88
timeoutForMediumTests="10"
99
timeoutForLargeTests="60"
1010
cacheDirectory=".phpunit.cache">
1111
<testsuites>
12-
<testsuite name="functional">
13-
<directory>tests/Functional</directory>
14-
</testsuite>
12+
<testsuite name="functional">
13+
<directory>tests/Functional</directory>
14+
</testsuite>
1515
</testsuites>
1616
<logging>
17-
<junit outputFile="build/phpunit"/>
17+
<junit outputFile="build/phpunit"/>
1818
</logging>
1919
<coverage>
20-
<include>
21-
<directory suffix=".php">src</directory>
22-
</include>
23-
<report>
24-
<html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
25-
</report>
20+
<report>
21+
<html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
22+
</report>
2623
</coverage>
24+
<source>
25+
<include>
26+
<directory suffix=".php">src</directory>
27+
</include>
28+
</source>
2729
</phpunit>

tests/Functional/JsonValueMatchesTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use Helmich\JsonAssert\JsonAssertions;
55
use PHPUnit\Framework\AssertionFailedError;
6+
use PHPUnit\Framework\Attributes\DataProvider;
67
use PHPUnit\Framework\Constraint\Count;
78
use PHPUnit\Framework\Constraint\IsEqual;
89
use PHPUnit\Framework\Constraint\IsType;
@@ -83,6 +84,7 @@ public static function dataForJsonValueEqualsCanFail()
8384
* @param $expectedValue
8485
* @dataProvider dataForJsonValueEquals
8586
*/
87+
#[DataProvider('dataForJsonValueEquals')]
8688
public function testJsonValueEqualsCanSucceed($jsonDocument, $jsonPath, $expectedValue)
8789
{
8890
$this->assertJsonValueEquals($jsonDocument, $jsonPath, $expectedValue);
@@ -94,6 +96,7 @@ public function testJsonValueEqualsCanSucceed($jsonDocument, $jsonPath, $expecte
9496
* @param $expectedValue
9597
* @dataProvider dataForJsonValueEqualsCanFail
9698
*/
99+
#[DataProvider('dataForJsonValueEqualsCanFail')]
97100
public function testJsonValueEqualsCanFail($jsonDocument, $jsonPath, $expectedValue)
98101
{
99102
$this->expectException(AssertionFailedError::class);
@@ -107,6 +110,7 @@ public function testJsonValueEqualsCanFail($jsonDocument, $jsonPath, $expectedVa
107110
* @param $expectedValue
108111
* @dataProvider dataForJsonValueEquals
109112
*/
113+
#[DataProvider('dataForJsonValueEquals')]
110114
public function testJsonValueMatchesCanSucceed($jsonDocument, $jsonPath, $expectedValue)
111115
{
112116
$this->assertJsonValueMatches(
@@ -131,6 +135,7 @@ public function testJsonValueMatchesSucceedsWithAnyConstraint()
131135
* @param $expectedValue
132136
* @dataProvider dataForJsonValueEqualsCanFail
133137
*/
138+
#[DataProvider('dataForJsonValueEqualsCanFail')]
134139
public function testJsonValueMatchesCanFail($jsonDocument, $jsonPath, $expectedValue)
135140
{
136141
$this->expectException(AssertionFailedError::class);

0 commit comments

Comments
 (0)