Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated AbstractFilter::hasPcreUnicodeSupport method #146

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,9 +1095,6 @@
</PossiblyUnusedMethod>
</file>
<file src="test/PregReplaceTest.php">
<DeprecatedMethod>
<code><![CDATA[PregReplaceFilter::hasPcreUnicodeSupport()]]></code>
</DeprecatedMethod>
<PossiblyUnusedMethod>
<code><![CDATA[returnNonStringScalarValues]]></code>
<code><![CDATA[returnUnfilteredDataProvider]]></code>
Expand Down
11 changes: 0 additions & 11 deletions src/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Laminas\Filter;

use Laminas\Stdlib\StringUtils;
use Traversable;

use function array_key_exists;
Expand Down Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions test/PregReplaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use PHPUnit\Framework\TestCase;
use stdClass;

use function preg_match;

class PregReplaceTest extends TestCase
{
private PregReplaceFilter $filter;
Expand All @@ -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<action>[a-z_-]+)#';
Expand Down