From a60692454dfd67e5696a6f46afa54e89c706ea5a Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 11 May 2026 17:20:11 +0700 Subject: [PATCH 1/2] chore: apply withRootFiles() on rector config --- psalm-autoload.php | 2 +- rector.php | 1 + tests/system/View/ParserTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/psalm-autoload.php b/psalm-autoload.php index 3eede20f1252..28889db1d642 100644 --- a/psalm-autoload.php +++ b/psalm-autoload.php @@ -24,7 +24,7 @@ $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $directory, - RecursiveDirectoryIterator::UNIX_PATHS | RecursiveDirectoryIterator::CURRENT_AS_FILEINFO, + RecursiveDirectoryIterator::UNIX_PATHS | RecursiveDirectoryIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS, ), RecursiveIteratorIterator::CHILD_FIRST, ); diff --git a/rector.php b/rector.php index 1a78def1c1e2..eeede43de2a7 100644 --- a/rector.php +++ b/rector.php @@ -71,6 +71,7 @@ __DIR__ . '/tests', __DIR__ . '/utils/src', ]) + ->withRootFiles() // do you need to include constants, class aliases or custom autoloader? files listed will be executed ->withBootstrapFiles([ __DIR__ . '/phpstan-bootstrap.php', diff --git a/tests/system/View/ParserTest.php b/tests/system/View/ParserTest.php index 5d81e177ee66..d1c06bdf6f5a 100644 --- a/tests/system/View/ParserTest.php +++ b/tests/system/View/ParserTest.php @@ -765,7 +765,7 @@ public function testParseRuns(): void public function testCanAddAndRemovePlugins(): void { - $this->parser->addPlugin('first', static fn ($str) => $str); + $this->parser->addPlugin('first', static fn ($str): string|array => $str); $setParsers = $this->getPrivateProperty($this->parser, 'plugins'); From f520ed46edb5fbdadcca70a187f8fd938bc423ee Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 11 May 2026 17:21:21 +0700 Subject: [PATCH 2/2] chore: run cs fix --- tests/system/View/ParserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/View/ParserTest.php b/tests/system/View/ParserTest.php index d1c06bdf6f5a..fa6784445e8e 100644 --- a/tests/system/View/ParserTest.php +++ b/tests/system/View/ParserTest.php @@ -765,7 +765,7 @@ public function testParseRuns(): void public function testCanAddAndRemovePlugins(): void { - $this->parser->addPlugin('first', static fn ($str): string|array => $str); + $this->parser->addPlugin('first', static fn ($str): array|string => $str); $setParsers = $this->getPrivateProperty($this->parser, 'plugins');