Make it possible for a rule to override back to default#46
Conversation
There was a problem hiding this comment.
Pull request overview
Enables later package-matching rules to override earlier rules back to the default value, while still preventing rules from overriding globally configured (non-default) settings.
Changes:
- Updated
Config::getConfigForPackage()to apply matching rule config keys in-order, allowing later rules to override earlier ones except for keys set globally to non-default values. - Added PHPUnit coverage to verify rule ordering behavior and to ensure rules cannot override global
security_updates_onlyorbundled_packages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/RuleObjectConfigTest.php | Adds tests for rule precedence and ensuring global config is not overridden by rules. |
| src/Config.php | Changes per-package rule application logic to allow “reset to default” via later rules while protecting global non-default keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.