-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Add compatibility to PHPUnit 9 #35662
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
Labels
Comments
@javiereguiluz Should I build a PR around this subject? Or it's better to discuss it before? |
This looks like a bug (or unsupported feature) so it will probably be accepted without much debate. So, you may create a PR to let the community discuss about the actual proposed implementation. Thanks! |
Hakihiro
pushed a commit
to Hakihiro/symfony
that referenced
this issue
Feb 14, 2020
Hakihiro
pushed a commit
to Hakihiro/symfony
that referenced
this issue
Feb 17, 2020
Hakihiro
pushed a commit
to Hakihiro/symfony
that referenced
this issue
Feb 17, 2020
[PhpUnitBridge] Add compatibility to PHPUnit 9 symfony#35662
nicolas-grekas
added a commit
that referenced
this issue
Feb 24, 2020
* 4.4: (25 commits) [DoctrineBridge] Use new Types::* constants and support new json type [Debug][ErrorHandler] improved deprecation notices for methods new args and return type [BrowserKit] Nested file array prevents uploading file [ExpressionLanguage] Fixed collisions of character operators with object properties [Validator] Remove specific check for Valid targets [PhpUnitBridge] Use trait instead of extending deprecated class Fix versioned namespace clears fix remember me Use strict assertion in asset tests [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types Do not rely on the current locale when dumping a Graphviz object fix typo [Ldap] force default network timeout [Config] don't throw on missing excluded paths Docs: Typo, grammar [Validator] Add the missing translations for the Polish ("pl") locale [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662 [Routing] Add locale requirement for localized routes [Console] Inline exact-match handling with 4.4 Set previous exception when rethrown from controller resolver ...
nicolas-grekas
added a commit
that referenced
this issue
Feb 24, 2020
* 5.0: (28 commits) [DoctrineBridge] Use new Types::* constants and support new json type Fix bad merge in README of Nexmo Notifier bridge [Debug][ErrorHandler] improved deprecation notices for methods new args and return type [BrowserKit] Nested file array prevents uploading file [ExpressionLanguage] Fixed collisions of character operators with object properties remove usage of already deleted Symfony\Component\EventDispatcher\Event [Notifier] Add correct tags for NullTransportFactory [Validator] Remove specific check for Valid targets [PhpUnitBridge] Use trait instead of extending deprecated class Fix versioned namespace clears fix remember me Use strict assertion in asset tests [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types Do not rely on the current locale when dumping a Graphviz object fix typo [Ldap] force default network timeout [Config] don't throw on missing excluded paths Docs: Typo, grammar [Validator] Add the missing translations for the Polish ("pl") locale [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662 ...
PhilETaylor
pushed a commit
to PhilETaylor/symfony
that referenced
this issue
Sep 6, 2023
* 4.4: (25 commits) [DoctrineBridge] Use new Types::* constants and support new json type [Debug][ErrorHandler] improved deprecation notices for methods new args and return type [BrowserKit] Nested file array prevents uploading file [ExpressionLanguage] Fixed collisions of character operators with object properties [Validator] Remove specific check for Valid targets [PhpUnitBridge] Use trait instead of extending deprecated class Fix versioned namespace clears fix remember me Use strict assertion in asset tests [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types Do not rely on the current locale when dumping a Graphviz object fix typo [Ldap] force default network timeout [Config] don't throw on missing excluded paths Docs: Typo, grammar [Validator] Add the missing translations for the Polish ("pl") locale [PhpUnitBridge] Add compatibility to PHPUnit 9 symfony#35662 [Routing] Add locale requirement for localized routes [Console] Inline exact-match handling with 4.4 Set previous exception when rethrown from controller resolver ...
PhilETaylor
pushed a commit
to PhilETaylor/symfony
that referenced
this issue
Sep 6, 2023
* 5.0: (28 commits) [DoctrineBridge] Use new Types::* constants and support new json type Fix bad merge in README of Nexmo Notifier bridge [Debug][ErrorHandler] improved deprecation notices for methods new args and return type [BrowserKit] Nested file array prevents uploading file [ExpressionLanguage] Fixed collisions of character operators with object properties remove usage of already deleted Symfony\Component\EventDispatcher\Event [Notifier] Add correct tags for NullTransportFactory [Validator] Remove specific check for Valid targets [PhpUnitBridge] Use trait instead of extending deprecated class Fix versioned namespace clears fix remember me Use strict assertion in asset tests [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types Do not rely on the current locale when dumping a Graphviz object fix typo [Ldap] force default network timeout [Config] don't throw on missing excluded paths Docs: Typo, grammar [Validator] Add the missing translations for the Polish ("pl") locale [PhpUnitBridge] Add compatibility to PHPUnit 9 symfony#35662 ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.4.4 (Tested version)
Description
Impossible to use PHPUnit 9 with the actual version of Symfony/PHPUnit-bridge
Because of: sebastianbergmann/phpunit#3914
How to reproduce
In a Symfony project (Version 4.4.4)
Change
SYMFONY_PHPUNIT_VERSION
to 9 (in phpunit.xml or env var)Launch your test you will get:
PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit\TextUI\Configuration\Configuration::getInstance()
Possible Solution
I suggest to :
CommandForV9
file with these changes :And add the new file in https://github.com/symfony/phpunit-bridge/blob/master/TextUI/Command.php to switch to the right Command depending on the version.
At this moment I don't know if more changes are required to be fully compatible with PHPUnit 9 but in my case, it's enough to be able to test my code.
The text was updated successfully, but these errors were encountered: