From 508df657071b9cde5786c9d3d3662a45afddf95c Mon Sep 17 00:00:00 2001 From: George Steel Date: Sat, 29 Jun 2024 18:14:11 +0100 Subject: [PATCH] Deprecate getters and setters in `Callback` filter Signed-off-by: George Steel --- psalm-baseline.xml | 9 +++++++++ src/Callback.php | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index da1492f7..0f641431 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -107,6 +107,10 @@ + + + + options['callback'], $params)]]> @@ -1500,6 +1504,11 @@ + + + + + diff --git a/src/Callback.php b/src/Callback.php index 22e23e23..d74935c3 100644 --- a/src/Callback.php +++ b/src/Callback.php @@ -46,9 +46,11 @@ public function __construct($callbackOrOptions = [], $callbackParams = []) /** * Sets a new callback for this filter * + * @deprecated since 2.37.0 - All option setters and getters will be removed in 3.0 + * * @param callable $callback - * @throws Exception\InvalidArgumentException * @return self + * @throws Exception\InvalidArgumentException */ public function setCallback($callback) { @@ -69,6 +71,8 @@ public function setCallback($callback) /** * Returns the set callback * + * @deprecated since 2.37.0 - All option setters and getters will be removed in 3.0 + * * @return callable */ public function getCallback() @@ -79,6 +83,8 @@ public function getCallback() /** * Sets parameters for the callback * + * @deprecated since 2.37.0 - All option setters and getters will be removed in 3.0 + * * @param array $params * @return self */ @@ -91,6 +97,8 @@ public function setCallbackParams($params) /** * Get parameters for the callback * + * @deprecated since 2.37.0 - All option setters and getters will be removed in 3.0 + * * @return array */ public function getCallbackParams()