rectorphp / rector

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
https://getrector.com
MIT License
8.76k stars 687 forks source link

withRootFiles() ignores ".php-cs-fixer.dist.php" #8896

Open andrew-demb opened 1 week ago

andrew-demb commented 1 week ago

Feature Request

Documentation at [1] states, that using withRootFiles will make sure, that rector will apply rules to the root directory PHP files like a "rector.php", "ecs.php", etc.

But rector doesn't apply rules for ".php-cs-fixer.dist.php" at the root directory for now.

Feature request is: withRootFiles should include hidden PHP files from the root (or at least for well known files like a ".php-cs-fixer.dist.php")

[1] https://getrector.com/documentation/define-paths

Diff

N/A

TomasVotruba commented 1 week ago

Sounds reasonable. Could you send PR with the fix?

andrew-demb commented 1 week ago

@TomasVotruba what's the proper way to fix it?

  1. Include any dot-prefixed PHP files
  2. Include just ".php-cs-fixer.dist.php"
TomasVotruba commented 1 week ago

What would be behavior you'd expect?