Skip to content

Commit 32de23c

Browse files
pl-githubNyholm
andauthored
Support phpunit 9 (#66)
* Support phpunit 9 * Update CHANGELOG.md Co-authored-by: Tobias Nyholm <[email protected]>
1 parent 9d89aa0 commit 32de23c

7 files changed

+25
-15
lines changed

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@ matrix:
1010
fast_finish: true
1111
include:
1212
# Minimum supported Symfony version with the latest PHP version
13-
- php: 7.2
13+
- php: 7.4
1414
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
1515

1616
# Test the latest stable release
1717
- php: 7.1
1818
- php: 7.2
19+
- php: 7.3
20+
- php: 7.4
1921
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"
2022

2123
# Force some major versions of Symfony
22-
- php: 7.2
24+
- php: 7.4
2325
env: DEPENDENCIES="dunglas/symfony-lock:^2"
24-
- php: 7.2
26+
- php: 7.4
2527
env: DEPENDENCIES="dunglas/symfony-lock:^3"
26-
- php: 7.2
28+
- php: 7.4
2729
env: DEPENDENCIES="dunglas/symfony-lock:^4"
2830

2931
# Latest commit to master
30-
- php: 7.2
32+
- php: 7.4
3133
env: STABILITY="dev"
3234

3335
allow_failures:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 4.2.0
4+
5+
- Support for PHPUnit9.
6+
37
## 4.1.0
48

59
- Support for Symfony5.

PhpUnit/ConfigurationValuesAreInvalidConstraint.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(
2424
$this->useRegExp = $useRegExp;
2525
}
2626

27-
public function evaluate($other, $description = '', $returnResult = false)
27+
public function evaluate($other, $description = '', $returnResult = false): ?bool
2828
{
2929
$this->validateConfigurationValuesArray($other);
3030

@@ -39,6 +39,8 @@ public function evaluate($other, $description = '', $returnResult = false)
3939
}
4040

4141
$this->fail($other, $description);
42+
43+
return null;
4244
}
4345

4446
public function toString(): string

PhpUnit/ConfigurationValuesAreValidConstraint.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __construct(ConfigurationInterface $configuration, $breadcrumbPa
1212
parent::__construct($configuration, $breadcrumbPath);
1313
}
1414

15-
public function evaluate($other, $description = '', $returnResult = false)
15+
public function evaluate($other, $description = '', $returnResult = false): ?bool
1616
{
1717
$this->validateConfigurationValuesArray($other);
1818

@@ -32,6 +32,8 @@ public function evaluate($other, $description = '', $returnResult = false)
3232
if (!$success) {
3333
$this->fail($other, $description);
3434
}
35+
36+
return null;
3537
}
3638

3739
public function toString(): string

PhpUnit/ProcessedConfigurationEqualsConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(
2020
parent::__construct($configuration, $breadcrumbPath);
2121
}
2222

23-
public function evaluate($other, $description = '', $returnResult = false)
23+
public function evaluate($other, $description = '', $returnResult = false): ?bool
2424
{
2525
$processedConfiguration = $this->processConfiguration($this->configurationValues);
2626

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ public function processed_configuration_for_array_node_1(): void
268268

269269
## Version Guidance
270270

271-
| Version | Released | PHPUnit | Status |
272-
|---------|--------------| ------------|------------|
273-
| 4.x | Mar 5, 2018 | 7.x and 8.x | Latest |
274-
| 3.x | Nov 30, 2017 | 6.x   | Bugfixes |
275-
| 2.x | Jun 18, 2016 | 4.x and 5.x | EOL |
276-
| 1.x | Oct 12, 2014 | 3.x | EOL
271+
| Version | Released | PHPUnit | Status |
272+
|---------|--------------| --------------------|------------|
273+
| 4.x | Mar 5, 2018 | 7.x and 8.x and 9.x | Latest |
274+
| 3.x | Nov 30, 2017 | 6.x   | Bugfixes |
275+
| 2.x | Jun 18, 2016 | 4.x and 5.x | EOL |
276+
| 1.x | Oct 12, 2014 | 3.x | EOL |

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"symfony/config": "^2.7 || ^3.4 || ^4.0 || ^5.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^7.0 || ^8.0"
20+
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
2121
},
2222
"conflict": {
2323
"phpunit/phpunit": "<7.0"

0 commit comments

Comments
 (0)