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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test environment to PHPUnit 10 #212

Closed
wants to merge 1 commit into from
Closed

Conversation

clue
Copy link
Owner

@clue clue commented Feb 4, 2023

PHPUnit 10 has been released (yesterday) 馃帀 Time to update our test suite to take advantage of the latest PHPUnit version on supported PHP versions (PHP 8.1+). All preparations have already landed in previous PRs linked below, so this update was really smooth sailing.

Builds on top of #207, #194, #199 and others

Comment on lines -9 to +8
convertDeprecationsToExceptions="true">
colors="true">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can approve this pull request, but I think we should mention that we might loose future visibility of deprecation notices. I looked a bit further into this.

In the changelog for PHPUnit 10 it says the following:

Removed the convertDeprecationsToExceptions attribute on the XML configuration element as well as the feature it used to control

So it seems we can't use convertDeprecationsToExceptions anymore, but there is a new option called displayDetailsOnTestsThatTriggerDeprecations. Not sure if this will have the same effect tho.

One solution to this could be to add another phpunit.xml specifically for PHPUnit 9 (PHP >= 7.3), but this feels kind of dirty, what do you think?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that we'd want to keep this functionality, fortunately looks like this might be re-introduced in PHPUnit 10.1 again via sebastianbergmann/phpunit#5196

We can keep this open until the upstream ticket is resolved, looks like we'll need to use separate XML configurations for PHPUnit 10, PHPUnit 9 and older in either case to support the current range of PHP versions. Not a fan of this, but fine, if that's what it takes.

@clue
Copy link
Owner Author

clue commented Apr 4, 2023

As per the above discussion, I'll close this for now and we can look into this again some time later once PHPUnit 10.1+ is released. In either case, the test suite has been updated via #217 in the meantime anyway.

@clue clue closed this Apr 4, 2023
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

2 participants