From 98c35ce5f7e16c916b662e5fd93c89b949910145 Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 13 Jun 2024 16:29:46 +0100 Subject: [PATCH] Remove deprecated `AbstractFilter::hasPcreUnicodeSupport` method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method has been irrelevant since around PHP 5.3 ish… Signed-off-by: George Steel --- psalm-baseline.xml | 3 --- src/AbstractFilter.php | 11 ----------- test/PregReplaceTest.php | 8 -------- 3 files changed, 22 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index f767b4e4..99bbe5b4 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1095,9 +1095,6 @@ - - - diff --git a/src/AbstractFilter.php b/src/AbstractFilter.php index 6accdef4..efaddfa6 100644 --- a/src/AbstractFilter.php +++ b/src/AbstractFilter.php @@ -4,7 +4,6 @@ namespace Laminas\Filter; -use Laminas\Stdlib\StringUtils; use Traversable; use function array_key_exists; @@ -32,16 +31,6 @@ abstract class AbstractFilter implements FilterInterface */ protected $options = []; - /** - * @deprecated Since 2.1.0 - * - * @return bool - */ - public static function hasPcreUnicodeSupport() - { - return StringUtils::hasPcreUnicodeSupport(); - } - /** * @param TOptions|iterable $options * @return self diff --git a/test/PregReplaceTest.php b/test/PregReplaceTest.php index 345685ed..8c2fd668 100644 --- a/test/PregReplaceTest.php +++ b/test/PregReplaceTest.php @@ -10,8 +10,6 @@ use PHPUnit\Framework\TestCase; use stdClass; -use function preg_match; - class PregReplaceTest extends TestCase { private PregReplaceFilter $filter; @@ -21,12 +19,6 @@ public function setUp(): void $this->filter = new PregReplaceFilter(); } - public function testDetectsPcreUnicodeSupport(): void - { - $enabled = (bool) @preg_match('/\pL/u', 'a'); - self::assertSame($enabled, PregReplaceFilter::hasPcreUnicodeSupport()); - } - public function testPassingPatternToConstructorSetsPattern(): void { $pattern = '#^controller/(?P[a-z_-]+)#';