Skip to content

Commit 8eca86d

Browse files
committed
ci(config): Update paths and ignore patterns in PHP CS Fixer config
- Rename 'build/' path to 'baselines/' - Add 'vendor/' to ignore paths - Include PHP files from current directory using glob - Adjust notPath to include specific directories and patterns - Ignore additional files for better configuration management
1 parent ebfff4f commit 8eca86d

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed

.php-cs-fixer.php

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -239,44 +239,34 @@
239239
$ruleSet->withCustomFixers(Fixers::fromFixers(
240240
...array_filter(
241241
iterator_to_array(new PhpCsFixerCustomFixers\Fixers),
242-
static fn (
243-
AbstractFixer $fixer
244-
): bool => !$fixer instanceof DeprecatedFixerInterface
242+
static fn (AbstractFixer $fixer): bool => !$fixer instanceof DeprecatedFixerInterface
245243
&& !\array_key_exists($fixer->getName(), $ruleSet->rules()->toArray())
246244
)
247245
));
248246

249247
return Factory::fromRuleSet($ruleSet)
250248
->setFinder(
251249
Finder::create()
252-
->in(__DIR__)
250+
->in([
251+
__DIR__.'/config/',
252+
__DIR__.'/src/',
253+
__DIR__.'/tests/',
254+
])
253255
->exclude([
254-
'.build/',
255-
'.chglog/',
256-
'.github/',
257-
'build/',
258-
'docs/',
259-
'vendor-bin/',
260-
'__snapshots__/',
261-
'tests/fixtures/',
262-
'tests/Fixtures/',
256+
'__snapshots__',
257+
'Fixtures',
263258
])
264-
->append(glob(__DIR__.'/{*,.*}.php', \GLOB_BRACE))
265259
->append([
260+
...array_filter(
261+
glob(__DIR__.'/{*,.*}.php', \GLOB_BRACE),
262+
static fn (string $filename): bool => !\in_array($filename, [
263+
__DIR__.'/.phpstorm.meta.php',
264+
// __DIR__.'/_ide_helper.php',
265+
__DIR__.'/_ide_helper_models.php',
266+
], true)
267+
),
266268
__DIR__.'/composer-updater',
267269
])
268-
->notPath([
269-
'bootstrap/*',
270-
'storage/*',
271-
'resources/view/mail/*',
272-
'vendor-bin/*',
273-
])
274-
->notName([
275-
'*.blade.php',
276-
// '_ide_helper.php',
277-
])
278-
->ignoreDotFiles(true)
279-
->ignoreVCS(true)
280270
)
281271
->setRiskyAllowed(true)
282272
->setUsingCache(true)

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ static function (array $carry, string $func): array {
226226
])
227227
->withSkip([
228228
DowngradeArraySpreadStringKeyRector::class => [
229+
__DIR__.'/.php-cs-fixer.php',
229230
__DIR__.'/src/Concerns/HasPipes.php',
230231
__DIR__.'/src/Concerns/HasExceptionPipes.php',
231232
],

0 commit comments

Comments
 (0)