Skip to content

Commit

Permalink
Merge pull request #211 from gsteel/v2/sep-to-sep-deprecations
Browse files Browse the repository at this point in the history
`SeparatorToSeparator` Deprecations
  • Loading branch information
gsteel authored Dec 18, 2024
2 parents b32782d + 79c4e9a commit 4cde1b3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
12 changes: 12 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,8 @@
<code><![CDATA[UriNormalize::class]]></code>
<code><![CDATA[UriNormalize::class]]></code>
<code><![CDATA[Whitelist::class]]></code>
<code><![CDATA[Word\Service\SeparatorToSeparatorFactory::class]]></code>
<code><![CDATA[Word\Service\SeparatorToSeparatorFactory::class]]></code>
</DeprecatedClass>
<DuplicateArrayKey>
<code><![CDATA[ToInt::class => InvokableFactory::class]]></code>
Expand Down Expand Up @@ -1626,6 +1628,10 @@
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[setReplacementSeparator]]></code>
<code><![CDATA[setSearchSeparator]]></code>
</DeprecatedMethod>
<DocblockTypeContradiction>
<code><![CDATA[$this->searchSeparator === null]]></code>
</DocblockTypeContradiction>
Expand Down Expand Up @@ -2108,6 +2114,12 @@
<code><![CDATA[$container]]></code>
</UnusedClosureParam>
</file>
<file src="test/FilterPluginManagerTest.php">
<DeprecatedMethod>
<code><![CDATA[getReplacementSeparator]]></code>
<code><![CDATA[getSearchSeparator]]></code>
</DeprecatedMethod>
</file>
<file src="test/ForceUriSchemeTest.php">
<PossiblyUnusedMethod>
<code><![CDATA[badSchemeProvider]]></code>
Expand Down
12 changes: 10 additions & 2 deletions src/Word/SeparatorToSeparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function __construct($searchSeparator = ' ', $replacementSeparator = '-')
/**
* Sets a new separator to search for
*
* @param string $separator Separator to search for
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @param string $separator Separator to search for
* @return self
*/
public function setSearchSeparator($separator)
Expand All @@ -52,6 +54,8 @@ public function setSearchSeparator($separator)
/**
* Returns the actual set separator to search for
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @return string
*/
public function getSearchSeparator()
Expand All @@ -62,7 +66,9 @@ public function getSearchSeparator()
/**
* Sets a new separator which replaces the searched one
*
* @param string $separator Separator which replaces the searched one
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @param string $separator Separator which replaces the searched one
* @return self
*/
public function setReplacementSeparator($separator)
Expand All @@ -74,6 +80,8 @@ public function setReplacementSeparator($separator)
/**
* Returns the actual set separator which replaces the searched one
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @return string
*/
public function getReplacementSeparator()
Expand Down
6 changes: 5 additions & 1 deletion src/Word/Service/SeparatorToSeparatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
use function iterator_to_array;
use function sprintf;

/** @final */
/**
* @deprecated This factory will be removed in 3.0.0 without replacement
*
* @final
*/
class SeparatorToSeparatorFactory implements FactoryInterface
{
/**
Expand Down

0 comments on commit 4cde1b3

Please sign in to comment.