Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,17 @@ function (string $filePath, string $prefix, string $content): string {
'@release_date@' => $releaseDateTime->format('Y-m-d H:i:s'),
]);
},

static function (string $filePath, string $prefix, string $content): string {
if (! \str_ends_with(
$filePath,
'vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMajorMinorDeprecationSetDefinition.php'
)) {
return $content;
}

// remove prefix in quote
return str_replace("'{$prefix}\\", "'\\", $content);
},
],
];
2 changes: 1 addition & 1 deletion src/DependencyInjection/LazyContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static function (Container $container): EasyCodingStandardStyle {
}
);

$ecsConfig->singleton(SymfonyStyle::class, static fn (): SymfonyStyle => SymfonyStyleFactory::create());
$ecsConfig->singleton(SymfonyStyle::class, SymfonyStyleFactory::create(...));

$ecsConfig->singleton(Fixer::class);

Expand Down
5 changes: 1 addition & 4 deletions src/FileSystem/FileFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ public function __construct(
*/
public function filterOnlyChangedFiles(array $filePaths): array
{
return array_filter(
$filePaths,
fn (string $filePath): bool => $this->changedFilesDetector->hasFileChanged($filePath)
);
return array_filter($filePaths, $this->changedFilesDetector->hasFileChanged(...));
}
}