Skip to content

Commit

Permalink
Deprecate TranslatorInterface in favour of the interface shipped by…
Browse files Browse the repository at this point in the history
… `laminas/laminas-translator`

Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 2, 2024
1 parent f8deca0 commit 5bd49f8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 20 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<file src="src/ConfigProvider.php">
<DeprecatedClass>
<code><![CDATA[Validator\PhoneNumber::class]]></code>
Expand Down Expand Up @@ -332,6 +332,9 @@
</PossiblyNullReference>
</file>
<file src="src/Translator/Translator.php">
<DeprecatedInterface>
<code><![CDATA[Translator]]></code>
</DeprecatedInterface>
<DocblockTypeContradiction>
<code><![CDATA[$message === null]]></code>
<code><![CDATA[$message === null]]></code>
Expand Down Expand Up @@ -444,6 +447,10 @@
</UnsafeInstantiation>
</file>
<file src="src/Translator/TranslatorAwareInterface.php">
<DeprecatedInterface>
<code><![CDATA[TranslatorInterface|null]]></code>
<code><![CDATA[TranslatorInterface|null]]></code>
</DeprecatedInterface>
<PossiblyUnusedMethod>
<code><![CDATA[hasTranslator]]></code>
<code><![CDATA[setTranslatorEnabled]]></code>
Expand All @@ -453,6 +460,13 @@
<code><![CDATA[$this]]></code>
</PossiblyUnusedReturnValue>
</file>
<file src="src/Translator/TranslatorAwareTrait.php">
<DeprecatedInterface>
<code><![CDATA[?TranslatorInterface]]></code>
<code><![CDATA[TranslatorInterface|null]]></code>
<code><![CDATA[TranslatorInterface|null]]></code>
</DeprecatedInterface>
</file>
<file src="src/Translator/TranslatorServiceFactory.php">
<DeprecatedInterface>
<code><![CDATA[TranslatorServiceFactory]]></code>
Expand Down Expand Up @@ -575,6 +589,11 @@
</PossiblyInvalidArgument>
</file>
<file src="src/View/Helper/AbstractTranslatorHelper.php">
<DeprecatedInterface>
<code><![CDATA[Translator|null]]></code>
<code><![CDATA[Translator|null]]></code>
<code><![CDATA[Translator|null]]></code>
</DeprecatedInterface>
<RedundantCastGivenDocblockType>
<code><![CDATA[(bool) $enabled]]></code>
</RedundantCastGivenDocblockType>
Expand Down
3 changes: 3 additions & 0 deletions src/Translator/TranslatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

/**
* Translator interface.
*
* @deprecated Since 2.27.0 The translator interface is now in a separate package `laminas/laminas-translator` and this
* interface should be replaced by `Laminas\Translator\TranslatorInterface`
*/
interface TranslatorInterface extends Translator
{
Expand Down

0 comments on commit 5bd49f8

Please sign in to comment.