Skip to content

Commit

Permalink
Filter Chain Deprecations
Browse files Browse the repository at this point in the history
See laminas#208

Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Dec 17, 2024
1 parent 51e83ce commit 116f9f5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
17 changes: 17 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,18 @@
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
<DeprecatedConstant>
<code><![CDATA[self::DEFAULT_PRIORITY]]></code>
<code><![CDATA[self::DEFAULT_PRIORITY]]></code>
<code><![CDATA[static::DEFAULT_PRIORITY]]></code>
<code><![CDATA[static::DEFAULT_PRIORITY]]></code>
</DeprecatedConstant>
<DeprecatedMethod>
<code><![CDATA[getPluginManager]]></code>
<code><![CDATA[getPluginManager]]></code>
<code><![CDATA[setOptions]]></code>
<code><![CDATA[setPluginManager]]></code>
</DeprecatedMethod>
<MixedPropertyTypeCoercion>
<code><![CDATA[new PriorityQueue()]]></code>
</MixedPropertyTypeCoercion>
Expand Down Expand Up @@ -2067,6 +2079,11 @@
</PossiblyUnusedMethod>
</file>
<file src="test/FilterChainTest.php">
<DeprecatedMethod>
<code><![CDATA[getFilters]]></code>
<code><![CDATA[getFilters]]></code>
<code><![CDATA[setOptions]]></code>
</DeprecatedMethod>
<PossiblyUnusedMethod>
<code><![CDATA[staticUcaseFilter]]></code>
</PossiblyUnusedMethod>
Expand Down
14 changes: 14 additions & 0 deletions src/FilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class FilterChain extends AbstractFilter implements Countable, IteratorAggregate
{
/**
* Default priority at which filters are added
*
* @deprecated This constant will be moved to `FilterChainInterface` in version 3.0
*/
public const DEFAULT_PRIORITY = 1000;

Expand Down Expand Up @@ -68,6 +70,8 @@ public function __construct($options = null)
}

/**
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @param FilterChainConfiguration|Traversable $options
* @return $this
* @throws Exception\InvalidArgumentException
Expand Down Expand Up @@ -125,6 +129,8 @@ public function count()
/**
* Get plugin manager instance
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @return FilterPluginManager
*/
public function getPluginManager()
Expand All @@ -141,6 +147,8 @@ public function getPluginManager()
/**
* Set plugin manager instance
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @return self
*/
public function setPluginManager(FilterPluginManager $plugins)
Expand All @@ -152,6 +160,8 @@ public function setPluginManager(FilterPluginManager $plugins)
/**
* Retrieve a filter plugin by name
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @param string $name
* @return FilterInterface|callable(mixed): mixed
*/
Expand Down Expand Up @@ -222,6 +232,8 @@ public function merge(FilterChain $filterChain)
/**
* Get all the filters
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* @return PriorityQueue<FilterInterface|callable(mixed): mixed, int>
*/
public function getFilters()
Expand Down Expand Up @@ -265,6 +277,8 @@ public function __clone()
/**
* Prepare filter chain for serialization
*
* @deprecated This method will be removed in 3.0.0 without replacement
*
* Plugin manager (property 'plugins') cannot
* be serialized. On wakeup the property remains unset
* and next invocation to getPluginManager() sets
Expand Down

0 comments on commit 116f9f5

Please sign in to comment.