rectorphp / rector-phpunit

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

Create a rector rule that will rename the array keys from the PHPUnit Dataprovider #330

Closed marcelthole closed 1 month ago

marcelthole commented 1 month ago

Create a rector rule that will rename the array keys from the PHPUnit Dataprovider to the argument name of the called test method to be prepared for the usage of named arguments in PHPUnit 11. This was already deprecated in PHPUnit 10.5

I think this is a risky rule because you could use the same dataProvider for multiple tests and the name of the arguments could be differ between the methods. (That's the point why i didn't added it to a new PHPUnit110 list)

Maybe it make sense to add an configurable option to remove the array key names completly to not use the named argument feature at all?

samsonasik commented 1 month ago

Please run:

vendor/bin/rector && composer fix-cs

To fix CI

marcelthole commented 1 month ago

Hey, is there something i could do to get this PR merged? or is something missing here?

samsonasik commented 1 month ago

LGTM, @TomasVotruba let's merge it ;)