diff --git a/scoper.php b/scoper.php index 39303209bf..3480415447 100644 --- a/scoper.php +++ b/scoper.php @@ -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); + }, ], ]; diff --git a/src/DependencyInjection/LazyContainerFactory.php b/src/DependencyInjection/LazyContainerFactory.php index 4485385226..a2876ba980 100644 --- a/src/DependencyInjection/LazyContainerFactory.php +++ b/src/DependencyInjection/LazyContainerFactory.php @@ -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); diff --git a/src/FileSystem/FileFilter.php b/src/FileSystem/FileFilter.php index 04ccb1b3ab..2e13f21fc3 100644 --- a/src/FileSystem/FileFilter.php +++ b/src/FileSystem/FileFilter.php @@ -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(...)); } }