Skip to content

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

@clue clue requested a review from SimonFrings February 4, 2023 20:05
Comment on lines -9 to +8
convertDeprecationsToExceptions="true">
colors="true">
Copy link
Contributor

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.

2 participants