From aefa0d464059d55f9031c7e35407b52f613ed189 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 18 Mar 2025 12:29:23 +0100 Subject: [PATCH] [TASK] Deprecate `::atRuleArgs()` These methods - are not used internally - are redundant to the existing getters - have wildly different return types across classes, which reduces the usefulness of the general method --- CHANGELOG.md | 1 + src/CSSList/AtRuleBlockList.php | 2 ++ src/CSSList/KeyFrame.php | 2 ++ src/Property/AtRule.php | 2 ++ src/Property/CSSNamespace.php | 2 ++ src/Property/Charset.php | 2 ++ src/Property/Import.php | 2 ++ src/RuleSet/AtRuleSet.php | 2 ++ 8 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74afb6a66..b34ee93a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Deprecated +- Deprecate `::atRuleArgs()` (#1191) - Support for PHP < 7.2 is deprecated; version 9.0 will require PHP 7.2 or later (#1264) - Passing a `string` or `null` to `RuleSet::removeRule()` is deprecated diff --git a/src/CSSList/AtRuleBlockList.php b/src/CSSList/AtRuleBlockList.php index a424adbe5..762d4900f 100644 --- a/src/CSSList/AtRuleBlockList.php +++ b/src/CSSList/AtRuleBlockList.php @@ -42,6 +42,8 @@ public function atRuleName() /** * @return string + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getter instead. */ public function atRuleArgs() { diff --git a/src/CSSList/KeyFrame.php b/src/CSSList/KeyFrame.php index 618308a76..a8706e192 100644 --- a/src/CSSList/KeyFrame.php +++ b/src/CSSList/KeyFrame.php @@ -101,6 +101,8 @@ public function atRuleName() /** * @return string|null + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getter instead. */ public function atRuleArgs() { diff --git a/src/Property/AtRule.php b/src/Property/AtRule.php index d946a9046..cfad3fef0 100644 --- a/src/Property/AtRule.php +++ b/src/Property/AtRule.php @@ -33,6 +33,8 @@ public function atRuleName(); /** * @return string|null + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getter(s) instead. */ public function atRuleArgs(); } diff --git a/src/Property/CSSNamespace.php b/src/Property/CSSNamespace.php index 188d3581f..4e792ee8b 100644 --- a/src/Property/CSSNamespace.php +++ b/src/Property/CSSNamespace.php @@ -116,6 +116,8 @@ public function atRuleName() /** * @return array + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getters instead. */ public function atRuleArgs() { diff --git a/src/Property/Charset.php b/src/Property/Charset.php index 1ebff3f3a..7bb793a6e 100644 --- a/src/Property/Charset.php +++ b/src/Property/Charset.php @@ -99,6 +99,8 @@ public function atRuleName() /** * @return string + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getter instead. */ public function atRuleArgs() { diff --git a/src/Property/Import.php b/src/Property/Import.php index 5b4744939..066f9d9b0 100644 --- a/src/Property/Import.php +++ b/src/Property/Import.php @@ -94,6 +94,8 @@ public function atRuleName() /** * @return array + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getters instead. */ public function atRuleArgs() { diff --git a/src/RuleSet/AtRuleSet.php b/src/RuleSet/AtRuleSet.php index e687cb961..834a14d84 100644 --- a/src/RuleSet/AtRuleSet.php +++ b/src/RuleSet/AtRuleSet.php @@ -45,6 +45,8 @@ public function atRuleName() /** * @return string + * + * @deprecated since V8.9.0, will be removed in version 9.0.0. Use the specific getter instead. */ public function atRuleArgs() {