From 1ade62f551c02000e191bb099372249294011e20 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 7c4d653b..1c4fe954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Deprecated +- Deprecate `::atRuleArgs()` (#1191) - Passing a `string` or `null` to `RuleSet::removeRule()` is deprecated (implementing classes are `AtRuleSet` and `DeclarationBlock`); use `removeMatchingRules()` or `removeAllRules()` instead (#1249) diff --git a/src/CSSList/AtRuleBlockList.php b/src/CSSList/AtRuleBlockList.php index a424adbe..762d4900 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 618308a7..a8706e19 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 d946a904..6f77b463 100644 --- a/src/Property/AtRule.php +++ b/src/Property/AtRule.php @@ -33,6 +33,8 @@ public function atRuleName(); /** * @return string|null + * + * @deprecated since V8.8.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 188d3581..6f37c3c1 100644 --- a/src/Property/CSSNamespace.php +++ b/src/Property/CSSNamespace.php @@ -116,6 +116,8 @@ public function atRuleName() /** * @return array + * + * @deprecated since V8.8.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 1ebff3f3..7bb793a6 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 5b474493..c7c1ce07 100644 --- a/src/Property/Import.php +++ b/src/Property/Import.php @@ -94,6 +94,8 @@ public function atRuleName() /** * @return array + * + * @deprecated since V8.8.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 e687cb96..834a14d8 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() {