Skip to content

Commit

Permalink
Merge pull request #159 from gsteel/deprecate-abstract-unicode
Browse files Browse the repository at this point in the history
Deprecate the `AbstractUnicode` class
  • Loading branch information
gsteel authored Aug 14, 2024
2 parents 27dda1e + 6104375 commit 581b146
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,12 +1285,18 @@
</DocblockTypeContradiction>
</file>
<file src="src/StringToLower.php">
<DeprecatedClass>
<code><![CDATA[AbstractUnicode]]></code>
</DeprecatedClass>
<PossiblyInvalidArgument>
<code><![CDATA[$encodingOrOptions]]></code>
<code><![CDATA[$encodingOrOptions]]></code>
</PossiblyInvalidArgument>
</file>
<file src="src/StringToUpper.php">
<DeprecatedClass>
<code><![CDATA[AbstractUnicode]]></code>
</DeprecatedClass>
<PossiblyInvalidArgument>
<code><![CDATA[$encodingOrOptions]]></code>
<code><![CDATA[$encodingOrOptions]]></code>
Expand Down Expand Up @@ -1344,6 +1350,9 @@
</RedundantConditionGivenDocblockType>
</file>
<file src="src/UpperCaseWords.php">
<DeprecatedClass>
<code><![CDATA[AbstractUnicode]]></code>
</DeprecatedClass>
<PossiblyInvalidArgument>
<code><![CDATA[$encodingOrOptions]]></code>
<code><![CDATA[$encodingOrOptions]]></code>
Expand Down Expand Up @@ -1459,6 +1468,10 @@
</MixedReturnStatement>
</file>
<file src="test/AbstractUnicodeTest.php">
<DeprecatedClass>
<code><![CDATA[AbstractUnicode]]></code>
<code><![CDATA[AbstractUnicode]]></code>
</DeprecatedClass>
<MissingTemplateParam>
<code><![CDATA[class extends AbstractUnicode {]]></code>
</MissingTemplateParam>
Expand Down
3 changes: 3 additions & 0 deletions src/AbstractUnicode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use function strtolower;

/**
* @deprecated Since 2.38.0 This class will be removed in version 3.0 without replacement. All inheritors of this
* class will re-implement the encoding option as a constructor argument without setters and getters.
*
* @psalm-type UnicodeOptions = array{
* encoding?: string|null,
* }
Expand Down

0 comments on commit 581b146

Please sign in to comment.