Skip to content

Commit

Permalink
withRootFiles now apply rector for dotfiles too (#6592)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-demb authored Dec 15, 2024
1 parent fa88e97 commit 967e983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ public function withSkipPath(string $skipPath): self
}

/**
* Include PHP files from the root directory,
* typically ecs.php, rector.php etc.
* Include PHP files from the root directory (including hidden ones),
* typically ecs.php, rector.php, .php-cs-fixer.dist.php etc.
*/
public function withRootFiles(): self
{
Expand Down Expand Up @@ -413,7 +413,9 @@ function (string $string): string {
$rootPhpFilesFinder = (new Finder())->files()
->in(getcwd())
->depth(0)
->name('*.php');
->ignoreDotFiles(false)
->name('*.php')
->name('.*.php');

foreach ($rootPhpFilesFinder as $rootPhpFileFinder) {
$path = $rootPhpFileFinder->getRealPath();
Expand Down

0 comments on commit 967e983

Please sign in to comment.