Skip to content
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

Phpunit 9 #149

Merged
merged 60 commits into from
Apr 3, 2020
Merged

Phpunit 9 #149

merged 60 commits into from
Apr 3, 2020

Conversation

Jean85
Copy link
Member

@Jean85 Jean85 commented Mar 5, 2020

This is still WIP, it doesn't work for now.

Due to some deprecations, I'm forced to change approach in how Paraunit collects the test results. This new approach uses the TestHook interfaces, which are cross-compatible from PHPUnit 7 up to 9, but those will be injectable through CLI only from PHPUnit 9.1 thanks to sebastianbergmann/phpunit#4136. This will mean that this PR will lead to a 1.1 release dropping PHPUnit < 9.1 support.

It will lead to a cleaner approach, but it requires a good overhaul of the Paraunit internals.

@Jean85 Jean85 added this to the Paraunit 1.0 milestone Mar 5, 2020
@Jean85 Jean85 self-assigned this Mar 5, 2020
@sebastianbergmann
Copy link

With regards to test hooks: these will be superseded by the new event system @theseer, @localheinz, @epdenouden are working on (see theseer/phpunit#1). This will hopefully be merged soon in time for PHPUnit 9.1 (or PHPUnit 9.2).

Test listeners were problematic, got deprecated, but so far have not been removed. Hooks were a lot better than listeners already, but still left a lot to be desired. Hooks will be deprecated when the event system is merged. Everything inside PHPUnit that currently still uses listeners will be refactored to use events. Then, hopefully in PHPUnit 10, both listeners and hooks will be removed.

@Jean85
Copy link
Member Author

Jean85 commented Mar 11, 2020

Thanks for the heads up @sebastianbergmann! I'll look into it!

@sebastianbergmann
Copy link

You're welcome. Any feedback, especially on missing events, would be appreciated.

@Jean85
Copy link
Member Author

Jean85 commented Mar 11, 2020

Opened theseer/phpunit#2 on the new approach; it seems incomplete for now, but I can proceed with using TestHooks and reconvert them easily to event subscribers as soon as that approach lands into PHPUnit.

@Jean85 Jean85 marked this pull request as ready for review March 20, 2020 16:41
@Jean85 Jean85 merged commit 021baa5 into master Apr 3, 2020
@Jean85 Jean85 deleted the phpunit-9 branch April 3, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants