Closed gnutix closed 6 days ago
Great :+1: Could you send the PR with fix? :)
Sorry, too much on my plate these days.
No worries :+1:
Closing as duplicate of similar issue to keep focus: https://github.com/rectorphp/rector-phpunit/issues/346#issuecomment-2198370779
Without this fix, the rule is only partially doing its job, and the "optional feature" triggers deprecations that are outputted by PHUnit. So please, don't close this issue, it's a separate problem from the other you've linked.
I missunderstood then. We'll need a failing demo link first.
Ref: https://github.com/rectorphp/rector-phpunit/pull/330
/cc @marcelthole
I added a failing testcase and fixed that case. We didn't had the case with multiple dataproviders on a single test method. But it should be fixed now :)
Hey there,
I've ran NamedArgumentForDataProviderRector on my project and noticed it only refactors the first
#[DataProvider]
it encounters. On my project, it missed about a 1/3 of the deprecations.Changing
getDataProviderMethodName
to return an array of method names :and calling it like this :
fixes the issue. /cc @marcelthole
gnutix