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

[PhpUnitBridge] Fix PHPUnit 10.1 compatibility #50048

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Apr 18, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

PHPUnit 10.1 moved the ErrorHandler class again. See sebastianbergmann/phpunit@9e60ead

@carsonbot carsonbot added this to the 5.4 milestone Apr 18, 2023
@carsonbot carsonbot changed the title [PHPUnitBridge] Fix PHPUnit 10.1 compatibility [PhpUnitBridge] Fix PHPUnit 10.1 compatibility Apr 18, 2023
@enumag
Copy link
Contributor Author

enumag commented Apr 18, 2023

I'm honestly not quite sure how to fix the psalm issues. One of the class names is always undefined no matter which PHPUnit version is used. 🤔

@nicolas-grekas
Copy link
Member

Thank you @enumag.

@nicolas-grekas nicolas-grekas merged commit 6470cc4 into symfony:5.4 Apr 18, 2023
9 of 10 checks passed
@arderyp
Copy link
Contributor

arderyp commented Apr 19, 2023

hey @nicolas-grekas and @enumag

I am somewhat confused by this PR/commit. This is on branch 5.4. Does this mean 5.4 is getting (or already has) support for PHPUnit 10? If so, should these be closed?

#49069
#49440

Also, @nicolas-grekas, if you work with symfony/panther, I have a PR open there that the project maintainer @dunglas has approved, which provides phpunit 10 support. If PHPUnit Bridge now supports PHPUnit 10, it may be worth updating a few things over there. But in either case, @dunglas has approved and seems to suggest that some "@symfony/mergers" team should kindly review (I am not sure who that would be).

@enumag
Copy link
Contributor Author

enumag commented Apr 19, 2023

hmm I'm not sure which version of phpunit does the 5.4 version support as composer.json doesn't say... if it doesn't support v10 then maybe it doesn't belong into 5.4? I just targeted the oldest supported version as is usual for bugs...

@arderyp
Copy link
Contributor

arderyp commented Apr 19, 2023

@enumag are you running symfony 5.4 with phpunit-bridge and phpunit 10?

@enumag
Copy link
Contributor Author

enumag commented Apr 19, 2023

@arderyp According to my composer.json that is the case, yes. I did update to 6.0 while I was trying to resolve the issues but I did have phpunit 10 along with phpunit-bridge 5.x for a while.

@arderyp
Copy link
Contributor

arderyp commented Apr 20, 2023

Yeah, composer doesn't restrict it, but I am unable to run phpunit 10 and phpunit-bridge side by side on my Symfony 5.4 project. As far as I know, bridge has not been updated to handle integration into phpunit 10 yet. If I drop phpunit-bridge via composer, phpunit 10 runs fine with my setup otherwise.

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.

None yet

4 participants