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

Idea for automated fix #8831

Open
OskarStark opened this issue Sep 19, 2024 · 7 comments
Open

Idea for automated fix #8831

OskarStark opened this issue Sep 19, 2024 · 7 comments
Labels

Comments

@OskarStark
Copy link
Contributor

Just found this in the Symfony codebase.

CleanShot 2024-09-19 at 08 01 17@2x

Not sure it is already done in PHPUNIT_QUALITY Set

@TomasVotruba
Copy link
Member

Thanks for sharing. How is useful to wide public?
Could you share PR with change from Symfony?

@OskarStark
Copy link
Contributor Author

cc @alexandre-daubois

@alexandre-daubois
Copy link

It was detected here: https://github.com/symfony/symfony/pull/58303/files, along with some other errors. The most common in the PR is that expected and actual are reversed in some calls. I know this is a common error, this could be nice to have a Rector rule as well for this?

@OskarStark
Copy link
Contributor Author

I know this is a common error, this could be nice to have a Rector rule as well for this?

Not sure this can be detected

@alexandre-daubois
Copy link

It was detected by PHPStorm automated tool. I think you can detect this by checking if the actual parameter is a constant of any kind, and expected is variable

@OskarStark
Copy link
Contributor Author

Makes sense

@TomasVotruba
Copy link
Member

TomasVotruba commented Sep 19, 2024

Alright then!
Feel free to kick off PR 👍

rector-symfony repository seems like best target

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

No branches or pull requests

3 participants