Skip to content

Conversation

@henriquemoody
Copy link
Member

@henriquemoody henriquemoody commented Jan 11, 2026

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.

Related to #1589

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.43%. Comparing base (6022914) to head (a1f007e).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a 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 AllOf class to LogicAnd and updated all internal references
  • Updated all mixin interfaces to replace allOf methods with logicAnd methods 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.
@henriquemoody henriquemoody deleted the rule/logicAnd branch January 11, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant