Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c88a006

Browse filesBrowse files
committed
bug #23015 [PhpUnitBridge] Fix detection of PHPUnit 5 (enumag)
This PR was merged into the 3.3 branch. Discussion ---------- [PhpUnitBridge] Fix detection of PHPUnit 5 | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Codeception 2.3 supports both PHPUnit 5 and PHPUnit 6 by defining [aliases](https://github.com/Codeception/Codeception/blob/2.3/shim.php). This confuses symfony/phpunit-bridge and it tries to load BC code for PHPUnit 5 even though I'm using PHPUnit 6. Commits ------- dfb5549 [PhpUnitBridge] Fix detection of PHPUnit 5
2 parents 3594bb4 + dfb5549 commit c88a006
Copy full SHA for c88a006

File tree

3 files changed

+3
-3
lines changed
Filter options

3 files changed

+3
-3
lines changed

‎src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use PHPUnit\Framework\TestSuite;
1717
use PHPUnit\Framework\Warning;
1818

19-
if (class_exists('PHPUnit_Framework_BaseTestListener')) {
19+
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
2020
class_alias('Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListener', 'Symfony\Bridge\PhpUnit\SymfonyTestsListener');
2121

2222
return;

‎src/Symfony/Bridge/PhpUnit/TextUI/Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/TextUI/Command.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use PHPUnit\TextUI\Command as BaseCommand;
1515

16-
if (class_exists('PHPUnit_TextUI_Command')) {
16+
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
1717
class_alias('Symfony\Bridge\PhpUnit\Legacy\Command', 'Symfony\Bridge\PhpUnit\TextUI\Command');
1818

1919
return;

‎src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use PHPUnit\TextUI\TestRunner as BaseRunner;
1515
use Symfony\Bridge\PhpUnit\SymfonyTestsListener;
1616

17-
if (class_exists('PHPUnit_TextUI_Command')) {
17+
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
1818
class_alias('Symfony\Bridge\PhpUnit\Legacy\TestRunner', 'Symfony\Bridge\PhpUnit\TextUI\TestRunner');
1919

2020
return;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.