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

Deprecate getters and setters in the HtmlEntities filter #218

Merged
merged 1 commit into from
Jan 6, 2025
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
35 changes: 34 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,20 @@
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[getDoubleQuote]]></code>
<code><![CDATA[getDoubleQuote]]></code>
<code><![CDATA[getEncoding]]></code>
<code><![CDATA[getEncoding]]></code>
<code><![CDATA[getEncoding]]></code>
<code><![CDATA[getEncoding]]></code>
<code><![CDATA[getQuoteStyle]]></code>
<code><![CDATA[getQuoteStyle]]></code>
<code><![CDATA[setDoubleQuote]]></code>
<code><![CDATA[setEncoding]]></code>
<code><![CDATA[setEncoding]]></code>
<code><![CDATA[setQuoteStyle]]></code>
</DeprecatedMethod>
<DocblockTypeContradiction>
<code><![CDATA[is_array($options)]]></code>
</DocblockTypeContradiction>
Expand Down Expand Up @@ -2061,8 +2075,8 @@
</InvalidArgument>
<PossiblyUnusedMethod>
<code><![CDATA[returnInvalidFilterInputProvider]]></code>
<code><![CDATA[returnValidFilterInputProvider]]></code>
<code><![CDATA[returnUnfilteredDataProvider]]></code>
<code><![CDATA[returnValidFilterInputProvider]]></code>
</PossiblyUnusedMethod>
</file>
<file src="test/File/RenameUploadTest.php">
Expand Down Expand Up @@ -2134,6 +2148,25 @@
</PossiblyUnusedMethod>
</file>
<file src="test/HtmlEntitiesTest.php">
<DeprecatedMethod>
<code><![CDATA[getCharSet]]></code>
<code><![CDATA[getCharSet]]></code>
<code><![CDATA[getDoubleQuote]]></code>
<code><![CDATA[getDoubleQuote]]></code>
<code><![CDATA[getEncoding]]></code>
<code><![CDATA[getQuoteStyle]]></code>
<code><![CDATA[getQuoteStyle]]></code>
<code><![CDATA[getQuoteStyle]]></code>
<code><![CDATA[setCharSet]]></code>
<code><![CDATA[setCharSet]]></code>
<code><![CDATA[setDoubleQuote]]></code>
<code><![CDATA[setDoubleQuote]]></code>
<code><![CDATA[setQuoteStyle]]></code>
<code><![CDATA[setQuoteStyle]]></code>
<code><![CDATA[setQuoteStyle]]></code>
<code><![CDATA[setQuoteStyle]]></code>
<code><![CDATA[setQuoteStyle]]></code>
</DeprecatedMethod>
<PossiblyUnusedMethod>
<code><![CDATA[returnUnfilteredDataProvider]]></code>
</PossiblyUnusedMethod>
Expand Down
24 changes: 20 additions & 4 deletions src/HtmlEntities.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public function __construct($options = [])
/**
* Returns the quoteStyle option
*
* @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement
*
* @return int
*/
public function getQuoteStyle()
Expand All @@ -104,7 +106,9 @@ public function getQuoteStyle()
/**
* Sets the quoteStyle option
*
* @param int $quoteStyle
* @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead
*
* @param int $quoteStyle
* @return self Provides a fluent interface
*/
public function setQuoteStyle($quoteStyle)
Expand All @@ -116,6 +120,8 @@ public function setQuoteStyle($quoteStyle)
/**
* Get encoding
*
* @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement
*
* @return string
*/
public function getEncoding()
Expand All @@ -126,7 +132,9 @@ public function getEncoding()
/**
* Set encoding
*
* @param string $value
* @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead
*
* @param string $value
* @return self
*/
public function setEncoding($value)
Expand All @@ -138,6 +146,8 @@ public function setEncoding($value)
/**
* Returns the charSet option
*
* @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement
*
* Proxies to {@link getEncoding()}
*
* @return string
Expand All @@ -150,9 +160,11 @@ public function getCharSet()
/**
* Sets the charSet option
*
* @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead
*
* Proxies to {@link setEncoding()}
*
* @param string $charSet
* @param string $charSet
* @return self Provides a fluent interface
*/
public function setCharSet($charSet)
Expand All @@ -163,6 +175,8 @@ public function setCharSet($charSet)
/**
* Returns the doubleQuote option
*
* @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement
*
* @return bool
*/
public function getDoubleQuote()
Expand All @@ -173,7 +187,9 @@ public function getDoubleQuote()
/**
* Sets the doubleQuote option
*
* @param bool $doubleQuote
* @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead
*
* @param bool $doubleQuote
* @return self Provides a fluent interface
*/
public function setDoubleQuote($doubleQuote)
Expand Down
Loading