From 41cb3ed77656b4e86bf8c82ad80fbce533d641e1 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sun, 12 Sep 2021 12:52:15 -0700 Subject: [PATCH] Do not normalize current version during comparison --- lib/Doctrine/DBAL/Version.php | 7 +++---- psalm.xml.dist | 9 --------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index 5115bf37e7e..0c0f1376be5 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -3,7 +3,7 @@ namespace Doctrine\DBAL; use function str_replace; -use function strtolower; +use function strtoupper; use function version_compare; /** @@ -28,9 +28,8 @@ class Version */ public static function compare($version) { - $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); - $version = str_replace(' ', '', $version); + $version = str_replace(' ', '', strtoupper($version)); - return version_compare($version, $currentVersion); + return version_compare($version, self::VERSION); } } diff --git a/psalm.xml.dist b/psalm.xml.dist index 656eee1f1cc..7215b8b3561 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -311,15 +311,6 @@ - - - - - -