From ab5f557028d83d88fba7e6956e8f90d642169d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sat, 25 Nov 2023 10:42:05 +0100 Subject: [PATCH] fix config --- rector.php | 1 + src/Console/PharInfoRenderer.php | 3 +-- src/functions.php | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rector.php b/rector.php index 210dffafb..bfaf4a6a2 100644 --- a/rector.php +++ b/rector.php @@ -24,6 +24,7 @@ $rectorConfig->skip([ \Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector::class, + \Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class, \Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => [ __DIR__.'/src/Configuration/Configuration.php', ], diff --git a/src/Console/PharInfoRenderer.php b/src/Console/PharInfoRenderer.php index 14559216c..547781632 100644 --- a/src/Console/PharInfoRenderer.php +++ b/src/Console/PharInfoRenderer.php @@ -36,7 +36,6 @@ use function implode; use function is_array; use function KevinGH\Box\format_size; -use function KevinGH\Box\format_size as format_size1; use function key; use function preg_match; use function round; @@ -307,7 +306,7 @@ public static function renderContent( ? $splFileInfo->getFilename() : $splFileInfo->getRelativePathname(), $compressionLine, - format_size1($compressionSize), + format_size($compressionSize), ), $depth, $indent, diff --git a/src/functions.php b/src/functions.php index 1ff33245f..b2ec30a4e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -16,8 +16,10 @@ use Composer\InstalledVersions; use ErrorException; +use Isolated\Symfony\Component\Finder\Finder as IsolatedFinder; use Phar; use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Finder\Finder as SymfonyFinder; use Webmozart\Assert\Assert; use function bin2hex; use function class_alias; @@ -160,8 +162,8 @@ function format_time(float $secs): string function register_aliases(): void { // Exposes the finder used by PHP-Scoper PHAR to allow its usage in the configuration file. - if (false === class_exists(\Isolated\Symfony\Component\Finder\Finder::class)) { - class_alias(\Symfony\Component\Finder\Finder::class, \Isolated\Symfony\Component\Finder\Finder::class); + if (false === class_exists(IsolatedFinder::class)) { + class_alias(SymfonyFinder::class, IsolatedFinder::class); } }