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 bridge] Support for PHPUnit 10.x #49069

Open
Jean85 opened this issue Jan 22, 2023 · 7 comments
Open

[PHPUnit bridge] Support for PHPUnit 10.x #49069

Jean85 opened this issue Jan 22, 2023 · 7 comments

Comments

@Jean85
Copy link
Contributor

Jean85 commented Jan 22, 2023

Description

PHPUnit 10 is around the corner (possibly released next month), and it contains a complete overhaul of its internals, particularly the new event system: sebastianbergmann/phpunit#4676

The new system also provides an easy way too hook into those events: https://github.com/sebastianbergmann/phpunit/blob/2a89c3c62c4d94fa92b72cb3693ca4fa057e4517/src/Event/Facade.php#L40
Among the events, there are even multiple dedicated to deprecations:

This maybe warrants a discussion here on how to tackle this new release, and how to leverage all this new features.

Example

No response

@Jean85
Copy link
Contributor Author

Jean85 commented Jan 23, 2023

I should add that those events are triggered through an error handler, and that having the bridge installed actively breaks it.

Maybe we should disable (and later disband) that feature under PHPUnit 10+?

@stof
Copy link
Member

stof commented Jan 24, 2023

Well, I don't think PHPUnit 10 contains the existing deprecation-related features of the bridge (at least not all of them).

However, we should look at rebuilding them on top of the PHPUnit events instead of replacing the error handler with our own for PHPUnit 10+.

@sebastianbergmann
Copy link
Contributor

I discussed PHPUnit 10's event system with @nicolas-grekas at SymfonyCon in November. I think the way forward for Symfony is to no longer register its own error handler for the bridge, let PHPUnit's own error handle emit events for deprecations etc., and then have the bridge subscribe to the events it is interested in. If you want the bridge to produce different output for deprecations than what PHPUnit offers out of the box.

@dozer111
Copy link

dozer111 commented Feb 8, 2023

Do u plan to fix it in 6.3?

@arderyp
Copy link
Contributor

arderyp commented Feb 9, 2023

now that PHPUnit 10 is out, I'm giving this a shot. I experience the same error noted here: symfony/recipes#1173

@nicolas-grekas notes here that this should resolve the problem.

It looks like that was merged, so I'm wondering what the next step is here.

@Jean85
Copy link
Contributor Author

Jean85 commented Feb 9, 2023

Next step would be adding the PHPUnit 10 support to the deprecation handler; this probably means a nearly total rewrite of it, to be done side-by-side to the old one, since the versioning of the bridge is tied to the framework.

@arderyp
Copy link
Contributor

arderyp commented Feb 9, 2023

Sounds pretty labor intensive.

Would you say this is a priority of the team, or consumers shouldn't expect to see 10 support for quite some time?

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

No branches or pull requests

6 participants