New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestRunner compatibility to PhpUnit 8 #30085

Open
wants to merge 2 commits into
base: 3.4
from

Conversation

Projects
None yet
4 participants
@alexander-schranz
Copy link
Contributor

alexander-schranz commented Feb 5, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets related to: #30055
License MIT
Doc PR -

Modify the installed phpunit version to be compatibility with the symfony custom TestRunner. This is sure not the best way but maybe currently the fastest way to support PhpUnit 8. The hack should be removed as soon as there is another way to implement a custom Runner.

@alexander-schranz alexander-schranz force-pushed the alexander-schranz:feature/phpunit-8-runner-compatibility branch 5 times, most recently from 3e4a969 to 0e36059 Feb 6, 2019

@alexander-schranz alexander-schranz changed the title Fix PhpUnit 8 runner compatibility Fix test runner compatibility to PhpUnit 8 Feb 6, 2019

@alexander-schranz alexander-schranz changed the title Fix test runner compatibility to PhpUnit 8 Fix TestRunner compatibility to PhpUnit 8 Feb 6, 2019

@alexander-schranz alexander-schranz force-pushed the alexander-schranz:feature/phpunit-8-runner-compatibility branch from 0e36059 to 353ba54 Feb 6, 2019

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Feb 7, 2019

@nicolas-grekas
Copy link
Member

nicolas-grekas left a comment

Before merging, we should be sure there is really no alternatives - we should also report the issue to Sebastian so that he knows some extensibility point is now missing. Could you please have a look?

if ($PHPUNIT_VERSION >= 8.0) {
// Fix compatibility to custom TestRunner for PhpUnit 8
$testRunnerFile = 'src/TextUI/TestRunner.php';
file_put_contents(

This comment has been minimized.

@nicolas-grekas

nicolas-grekas Feb 7, 2019

Member

should be on one line

@kunicmarko20

This comment has been minimized.

Copy link

kunicmarko20 commented Feb 7, 2019

Isn't it a better solution to check phpunit version here:

if (false) {
class TestRunner
{
}
}

and then provide the class with or without final? (if it is even possible like that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment