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 9.6 misses deprecation warning for withConsecutive() removed in PHPUnit 10 #5182

Closed
SimonFrings opened this issue Feb 8, 2023 · 2 comments
Labels
version/9 Something affects PHPUnit 9

Comments

@SimonFrings
Copy link

Q A
PHPUnit version 9.6.3
PHP version 8.1, 8.2
Installation Method Composer

Summary

We read about the changes in PHPUnit 10 and the removal of withConsecutive() + its alternatives (#4564 and #4026), so starting with a smooth upgrade path for our projects by upgrading to PHPUnit 9.6 first seemed like a logical step. We expected to see deprecation warnings for withConsecutive(), as they have been deprecated in #5063. After running the test suite with 9.6.3, there was no output to inform us about any deprecation, so it seems to me that there are no warnings for this method implemented yet, but I think there should be.

I'm interested in your thoughts on this.

Btw, thanks for all the work you put into PHPUnit 👍

@SimonFrings SimonFrings added the type/bug Something is broken label Feb 8, 2023
@sebastianbergmann
Copy link
Owner

Adding @deprecated to the method declaration of withConsecutive() unfortunately is the only thing that we can do here due to the way the internals of PHPUnit 9 work.

In PHPUnit 10 we would simply trigger an event ("test used deprecated PHPUnit feature"), but in PHPUnit 9 we simply do not have a way to report deprecations in the test double system.

@sebastianbergmann sebastianbergmann added version/9 Something affects PHPUnit 9 and removed type/bug Something is broken labels Feb 8, 2023
@oleg-andreyev
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/9 Something affects PHPUnit 9
Projects
None yet
Development

No branches or pull requests

3 participants