rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
http://getrector.com
MIT License
61 stars 46 forks source link

[PHPUnit100] Adds the PublicDataProviderClassMethodRector rule #301

Closed peterfox closed 6 months ago

peterfox commented 6 months ago

Changes

Why

PHPUnit 10 expects data providers to be both Public and Static whereas before both were not a requirement. There was already a rule for static data providers but protected/private scenario hasn't been covered. For ease of use I've created a new rule rather than changing the static rule to cover both scenarios.

TomasVotruba commented 6 months ago

Seems good to go :+1: Just one detail from rector CI workflow

peterfox commented 6 months ago

Thanks @TomasVotruba, I've refactored and will hopefully have fixed it

TomasVotruba commented 6 months ago

Thanks :+1: Let's see.

If you want to avoid waiting for CI, you can do the same check locally:

vendor/bin/rector
TomasVotruba commented 6 months ago

All good, thank you :clap: