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 10 | Make all assertion/exception methods final #104

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Mar 31, 2023

PHPUnit 10.0 makes all assertion and exception methods final, so the PHPUnit Polyfills should follow suit.

There is one trait which I've exempted from this: AssertClosedResource, as when the methods in that trait (and the empty version of that trait) are made final, we'll run into trouble on PHPUnit < 9.x.


Note to self: PHPCSExtra 1.1.0 is expected to include a sniff which can enforce this. Once that release is available, that sniff should be added to the PHPCS ruleset to safeguard this.

PHPUnit 10.0 makes all assertion and exception methods `final`, so the PHPUnit Polyfills should follow suit.

There is one trait which I've exempted from this: `AssertClosedResource`, as when the methods in that trait (and the empty version of that trait) are made `final`, we'll run into trouble on PHPUnit < 9.x.

Note to self: [PHPCSExtra](https://github.com/PHPCSStandards/PHPCSExtra) 1.1.0 is expected to include a sniff which can enforce this. Once that release is available, that sniff should be added to the PHPCS ruleset to safeguard this.
@jrfnl jrfnl added this to the 2.0.0 milestone Mar 31, 2023
@jrfnl jrfnl enabled auto-merge March 31, 2023 00:15
@jrfnl jrfnl merged commit 7b7b668 into 2.x Mar 31, 2023
@jrfnl jrfnl deleted the 2.0/phpunit-10/make-assertions-final branch March 31, 2023 00:15
@jrfnl jrfnl mentioned this pull request Mar 31, 2023
11 tasks
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.

1 participant