-
Notifications
You must be signed in to change notification settings - Fork 775
Rename AllOf to LogicAnd
#1600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename AllOf to LogicAnd
#1600
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1600 +/- ##
=========================================
Coverage 97.43% 97.43%
Complexity 981 981
=========================================
Files 211 211
Lines 2259 2259
=========================================
Hits 2201 2201
Misses 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4ba1cbb to
bbda727
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR renames the AllOf validator to LogicAnd as part of version 3.0 improvements. The new name LogicAnd more clearly indicates that this is a logical AND operation where all provided rules must pass for the same input value, reducing potential confusion with iteration semantics.
Changes:
- Renamed the
AllOfclass toLogicAndand updated all internal references - Updated all mixin interfaces to replace
allOfmethods withlogicAndmethods across Builder and Chain interfaces - Updated comprehensive documentation including validator docs, feature guide, and API examples
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| library/Validators/LogicAnd.php | Renamed class from AllOf to LogicAnd |
| library/Validators/Core/Reducer.php | Updated internal usage to LogicAnd |
| library/Validators/Between.php | Updated internal usage to LogicAnd |
| library/Validators/BetweenExclusive.php | Updated internal usage to LogicAnd |
| library/ValidatorBuilder.php | Updated internal usage to LogicAnd |
| library/Transformers/Prefix.php | Updated rules list to reference logicAnd |
| library/Mixins/*.php | Updated all mixin interfaces to replace allOf with logicAnd methods |
| tests/unit/Validators/LogicAndTest.php | Renamed test file and updated all references |
| tests/unit/Validators/AllOfTest.php | Removed old test file |
| tests/unit/Validators/Core/ReducerTest.php | Updated test to use LogicAnd |
| tests/feature/Validators/LogicAndTest.php | Updated feature tests to use logicAnd method |
| docs/validators/LogicAnd.md | Updated validator documentation with new name and improved description |
| docs/validators/*.md | Updated related validator docs to reference LogicAnd |
| docs/list-of-validators-by-category.md | Updated category listings and added Logic category |
| docs/feature-guide.md | Updated grouped validation reference |
| docs/concrete-api.md | Updated API example |
| docs/validators/Control.md | Unintended change - contains a bug |
| src-dev/Commands/UpdateDocLinksCommand.php | Minor unrelated fix to remove "08-" prefix |
Comments suppressed due to low confidence (1)
docs/validators/LogicAnd.md:46
- The table separator row is inconsistently formatted. It should use spaces around the pipe character to match the formatting in the row above (line 45). The current format with dashes between pipes without spaces ("|-----:|------------------------------------------------------------------------") should be "| ------: | -------------------------------------------------------------------- |" for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The name `AllOf` was ambiguous and could be confused with iteration semantics. The new name `LogicAnd` clearly indicates this is a logical `AND` operation where all provided rules must pass for the same input value. This rename is part of a broader effort to improve the naming of composite rules in version 3.0, making them more intuitive and reducing potential confusion when implementing validation logic.
bbda727 to
a1f007e
Compare
The name
AllOfwas ambiguous and could be confused with iteration semantics. The new nameLogicAndclearly indicates this is a logicalANDoperation where all provided rules must pass for the same input value.This rename is part of a broader effort to improve the naming of composite rules in version 3.0, making them more intuitive and reducing potential confusion when implementing validation logic.
Related to #1589