diff --git a/rector.php b/rector.php index 64abc9a73541..4613f89fbe3c 100644 --- a/rector.php +++ b/rector.php @@ -12,11 +12,11 @@ */ use Rector\Caching\ValueObject\Storage\FileCacheStorage; -use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector; use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector; use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector; +use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector; use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; use Rector\CodeQuality\Rector\If_\ShortenElseIfRector; @@ -171,6 +171,8 @@ // Unnecessary (string) is inserted NullToStrictStringFuncCallArgRector::class, + + CompactToVariablesRector::class, ]) // auto import fully qualified class names ->withImportNames(removeUnusedImports: true) @@ -196,7 +198,6 @@ EmptyOnNullableObjectToInstanceOfRector::class, DisallowedEmptyRuleFixerRector::class, PrivatizeFinalClassPropertyRector::class, - CompleteDynamicPropertiesRector::class, BooleanInIfConditionRuleFixerRector::class, VersionCompareFuncCallToConstantRector::class, AddClosureVoidReturnTypeWhereNoReturnRector::class, @@ -210,4 +211,4 @@ // keep '\\' prefix string on string '\Foo\Bar' StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, ]) - ->withCodeQualityLevel(24); + ->withCodeQualityLevel(31); diff --git a/system/Security/Security.php b/system/Security/Security.php index 0b51062e4cdb..4d4d856cc1d8 100644 --- a/system/Security/Security.php +++ b/system/Security/Security.php @@ -377,7 +377,7 @@ protected function derandomize(string $token): string return bin2hex(hex2bin($value) ^ hex2bin($key)); } catch (ErrorException $e) { // "hex2bin(): Hexadecimal input string must have an even length" - throw new InvalidArgumentException($e->getMessage()); + throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } }