But I would like to integrate it into rector/rector-phpunit itself, as I'm pretty sure it will be useful for other teams that would like to automatically add #[CoversClass()] to their test classes and automatically guess source file used as a value of this attribute. This is pretty convenient, and existing tools, including PHP-CS-Fixer, doesn't help with it.
But before creating a PR, I would like to know if it's going to be accepted to not waste time.
Also, this issue will popup in a search so even if it's not going to be accepted, one will have a link to a custom implementation.
Desired behavior:
Actually, I've already implemented it as a custom rule as we need it in Infection. It works great and covered by tests
https://github.com/infection/infection/commit/03da55739a01e38f2ddf3dbef9f0f7e6adf53f42#diff-8a5ee371c08d2d066c7dfe04dea926a679e3ff5fb35ff93a228aa2a5c46e3699R65
But I would like to integrate it into
rector/rector-phpunit
itself, as I'm pretty sure it will be useful for other teams that would like to automatically add#[CoversClass()]
to their test classes and automatically guess source file used as a value of this attribute. This is pretty convenient, and existing tools, including PHP-CS-Fixer, doesn't help with it.But before creating a PR, I would like to know if it's going to be accepted to not waste time.
Also, this issue will popup in a search so even if it's not going to be accepted, one will have a link to a custom implementation.