All notable changes to Mighty will be documented in this file.
- PHP 8.2 support.
- Update
Constraint
class:- Add
$validator
property. - Rename
getValidator()
method togetMasterValidator()
, this method as the name suggests, returns the Master Validator of all constraints. - Add
getValidator()
method, this method return the Validator local to the constraint (which is by default a clone of the Master Validator, but can be swapped usingsetValidator()
). - Add
setValidator()
method. - Update
validate()
method to make use of object's Validator.
- Add
- Update
Compound
class:- Rename method
groupConstraints()
tocombineConstraints()
- Update class constructor to use the Master Validator to check parameters validity.
- Rename method
- Update
Shape
class:- Rename property
$recursive
to$traverse
- Update class constructor to use the Master Validator to check parameters validity.
- Update
validate()
method to make use of object's Validator.
- Rename property
- Update
Callback
class:- Update class constructor to use the Master Validator to check parameters validity.
- Update
validate()
method to make use of object's Validator.
- Update
Valid
class:- Update
validate()
method to make use of object's Validator.
- Update
- Update
Maker
class:- Move
Maker
class fromMAKS\Mighty\Validation
toMAKS\Mighty
(root) namespace. Note that no backward compatibility issues will be introduced by this change as this class is marked as internal.
- Move
- Update rule constraints:
- Regenerate
src/Validation/Constraints/Rule/*
. - Update
Rule\Validation
class.
- Regenerate
- Update test:
- Add
LogicTest
class.
- Add
- Update rules:
- Fix
data
rules:- Refactor
json
rule to useJSON_THROW_ON_ERROR
. - Update
xml
rule to clear libxml errors before checking.
- Refactor
- Fix
- Update
Engine
class:- Refactor
parseExpression()
method. - Update
clearExpression()
method.
- Refactor
- Update rules:
- Fix
common
,condition
, andimage
rules messages placeholders.
- Fix
- Update
Expression
class:- Fix
build()
method checks for expression validity. - Add
concat()
method. - Update
write()
method. - Add
comment()
method. - Update
variable()
method.
- Fix
- Update
Engine
class:- Fix
evaluateBitwiseExpression()
method checks for expression validity. - Update
parseExpression()
method to allow for same rule repetition. - Add
cleanExpression()
method. - Add
evaluateExpression()
method.
- Fix
- Update
Utility
class:- Update
transform()
method to always useUTF-8
.
- Update
- Update
Validator
class:- Refactor
validateOne()
method.
- Refactor
- Update test:
- Add
EngineTest
class. - Update
ValidationTest
class. - Update
ValidatorTest
class.
- Add
- Update
Rule
class:- Update
createErrorMessage()
to pass rule name as a second parameter for message translation callback to allow for translating error messages easily based on rule name rather than the actual message.
- Update
- Update
Shape
class:- Update
__construct()
to add a check for the type of the nested attributes (allow only valid attributes).
- Update
- Stable release.
- Release candidate.
- Beta release.