From 2c43627e9c5214888347f8a9650cc0b63a949ba9 Mon Sep 17 00:00:00 2001 From: George Steel Date: Sun, 30 Jun 2024 16:13:52 +0100 Subject: [PATCH] Deprecate option setters and getters in `Hostname` Signed-off-by: George Steel --- psalm-baseline.xml | 21 +++++++++++++++++++++ src/Hostname.php | 22 +++++++++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 44cfe259..822d7b50 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1638,6 +1638,18 @@ + + + + + + + + + + + + @@ -2473,6 +2485,10 @@ + + + + @@ -2839,6 +2855,11 @@ + + + + + diff --git a/src/Hostname.php b/src/Hostname.php index 439d62f5..6a191cd6 100644 --- a/src/Hostname.php +++ b/src/Hostname.php @@ -1833,6 +1833,8 @@ public function __construct($options = []) /** * Returns the set ip validator * + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * * @return Ip */ public function getIpValidator() @@ -1841,6 +1843,8 @@ public function getIpValidator() } /** + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * * @param Ip $ipValidator OPTIONAL * @return self */ @@ -1857,6 +1861,8 @@ public function setIpValidator(?Ip $ipValidator = null) /** * Returns the allow option * + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * * @return int */ public function getAllow() @@ -1867,7 +1873,9 @@ public function getAllow() /** * Sets the allow option * - * @param int $allow + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * + * @param int $allow * @return $this Provides a fluent interface */ public function setAllow($allow) @@ -1879,6 +1887,8 @@ public function setAllow($allow) /** * Returns the set idn option * + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * * @return bool */ public function getIdnCheck() @@ -1891,7 +1901,9 @@ public function getIdnCheck() * * This only applies when DNS hostnames are validated * - * @param bool $useIdnCheck Set to true to validate IDN domains + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * + * @param bool $useIdnCheck Set to true to validate IDN domains * @return $this */ public function useIdnCheck($useIdnCheck) @@ -1903,6 +1915,8 @@ public function useIdnCheck($useIdnCheck) /** * Returns the set tld option * + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * * @return bool */ public function getTldCheck() @@ -1915,7 +1929,9 @@ public function getTldCheck() * * This only applies when DNS hostnames are validated * - * @param bool $useTldCheck Set to true to validate TLD elements + * @deprecated Since 2.61.0 all options getters and setters will be removed in 3.0 + * + * @param bool $useTldCheck Set to true to validate TLD elements * @return $this */ public function useTldCheck($useTldCheck)