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

Deprecate setMethods() #4775

Closed
mondrake opened this issue Sep 11, 2021 · 1 comment
Closed

Deprecate setMethods() #4775

mondrake opened this issue Sep 11, 2021 · 1 comment
Assignees

Comments

@mondrake
Copy link

Q A
PHPUnit version 9.5
PHP version n/a
Installation Method n/a

Summary

Working on adjusting Drupal for PHPUnit 10, I realized MockBuilder::setMethods is removed from PHPUnit 10. Unlike other methods deprecated in PHPUnit 8 and 9, there's no warning thrown about the deprecation.

Since in Drupal we rely on deprecation errors being triggered, so far this deprecation was missed from any conversion.

Current behavior

n/a

How to reproduce

n/a

Expected behavior

I suppose a Warning should be thrown in PHPUnit 9, on top of the annotated deprecation.

@mondrake mondrake added the type/bug Something is broken label Sep 11, 2021
@sebastianbergmann sebastianbergmann added this to the PHPUnit 9.6 milestone Sep 11, 2021
@sebastianbergmann sebastianbergmann added type/deprecation Something will be/is deprecated feature/test-doubles Stubs and Mock Objects and removed type/bug Something is broken labels Sep 25, 2022
@sebastianbergmann sebastianbergmann self-assigned this Sep 25, 2022
@sebastianbergmann sebastianbergmann changed the title Deprecated MockBuilder::setMethods does not throw a warning in PHPUnit 9 Deprecate setMethods() Sep 25, 2022
@sebastianbergmann
Copy link
Owner

Unfortunately, "soft deprecation" (annotating the methods in question with @deprecated is the only feasible way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants