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

Missing deprecation from phpunit 10? #292

Closed
bbrala opened this issue Nov 10, 2023 · 3 comments · Fixed by #293
Closed

Missing deprecation from phpunit 10? #292

bbrala opened this issue Nov 10, 2023 · 3 comments · Fixed by #293

Comments

@bbrala
Copy link
Contributor

bbrala commented Nov 10, 2023

It seems setMethods on mockBuilder is deprecated in PHPUNIT 10, this rule is currently under the codestyle setlist, but it seems it should be in the phpunit10 setlist? Am i missing something?

sebastianbergmann/phpunit#3687

RemoveSetMethodsMethodCallRector::class, is the class im talking about.

@TomasVotruba
Copy link
Member

You're right 👍 Could you add it to particular set?

@bbrala
Copy link
Contributor Author

bbrala commented Nov 10, 2023

Hmm, the thing is though. The rector is pretty simple, just remove it. But seems like it is technically a little different.

Its has been deprecated in phpunit sebastianbergmann/phpunit@d618fa3 so should we fix it since phpunit 8?

Also there are alternatives as mentioned here: sebastianbergmann/phpunit#3687 (with somemore deprecation info).

What should rector do? Remove usage from 8 and up? Or even make the replacement better, although im not sure it is even possible since the signatures are a little different.

@bbrala
Copy link
Contributor Author

bbrala commented Nov 10, 2023

Opened a PR which moves it to the phpunit_100 setlist

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

Successfully merging a pull request may close this issue.

2 participants