diff --git a/CHANGELOG.md b/CHANGELOG.md index cab8e1e9..7c4d653b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Passing a `string` or `null` to `RuleSet::removeRule()` is deprecated (implementing classes are `AtRuleSet` and `DeclarationBlock`); use `removeMatchingRules()` or `removeAllRules()` instead (#1249) +- Passing a `Rule` to `RuleSet::getRules()` or `getRulesAssoc()` is deprecated, + affecting the implementing classes `AtRuleSet` and `DeclarationBlock` + (call e.g. `getRules($rule->getRule())` instead) (#1248) - Passing a string as the first argument to `getAllValues()` is deprecated; the search pattern should now be passed as the second argument (#1241) - Passing a Boolean as the second argument to `getAllValues()` is deprecated; diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index 8cd4904d..1658154c 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -146,7 +146,8 @@ public function addRule(Rule $oRule, $oSibling = null) * Pattern to search for. If null, returns all rules. * If the pattern ends with a dash, all rules starting with the pattern are returned * as well as one matching the pattern with the dash excluded. - * Passing a Rule behaves like calling `getRules($mRule->getRule())`. + * Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0. + * Call `getRules($rule->getRule())` instead. * * @return array */ @@ -205,7 +206,9 @@ public function setRules(array $aRules) * @param Rule|string|null $mRule $mRule * Pattern to search for. If null, returns all rules. If the pattern ends with a dash, * all rules starting with the pattern are returned as well as one matching the pattern with the dash - * excluded. Passing a Rule behaves like calling `getRules($mRule->getRule())`. + * excluded. + * Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0. + * Call `getRulesAssoc($rule->getRule())` instead. * * @return array */