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

NamedArgumentForDataProviderRector not working because the class DataProvider is using a scoped rector version #344

Closed
gnutix opened this issue Jun 29, 2024 · 2 comments · Fixed by #347
Assignees

Comments

@gnutix
Copy link

gnutix commented Jun 29, 2024

Hello there,

I've just tried the new NamedArgumentForDataProviderRector rule and was surprised that it changed nothing in my project. I started debugging and the issue was this :

-use RectorPrefix202406\PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\DataProvider;

I'm not sure if the issue is that the DataProvider class must be referenced somewhere in Rector's code to be properly handled when scoped, or if the issue is with how Rector is installed in our project (which is quite standard I think, but these things tend to get complicated real fast, so who knows...).

gnutix

@TomasVotruba
Copy link
Member

Hi, indeed, this class name should be untouched.

@samsonasik Could you fix this one, as it requires a bit of Rector internals?

@samsonasik
Copy link
Member

Yes, here the PR:

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