Custom predefined invariants #92

Open
opened 2026-10-24 09:20:45 +02:00 by c.fahner · 0 comments
Owner

Currently schema invariants are required to be an instance of Constraint\Invariant. The final modifier could be dropped from this class to allow for custom implementations that directly provide the public Predicate $condition property.

The library could immediately provide some common cases in the Constraint\Invariant\* namespace:

  • Number in range
  • Numeric comparison between field and literal or other field
Currently schema invariants are required to be an instance of `Constraint\Invariant`. The `final` modifier could be dropped from this class to allow for custom implementations that directly provide the `public Predicate $condition` property. The library could immediately provide some common cases in the `Constraint\Invariant\*` namespace: * Number in range * Numeric comparison between field and literal or other field
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd#92
No description provided.