Releases: dealnews/constraints
Releases · dealnews/constraints
Bug Fix
v2.2.0
Development improvements and bug fixes
Arrays can have constraints for its contents
An array constraint can now have a 'constraint' inside of itself that defines the constraint to apply to its contents.
Example:
$constraint = \DealNews\Constraints\Constraint::init();
$value = ["1"];
try {
$value = $constraint->check($value, ["type" => "array", "constraint" => ["type" => "integer"]]);
// $value will now be [1]
} catch (\DealNews\Constraints\ConstraintException $e) {
echo $e->getMessage();
}
Coding Standards Update
Updated to match the DealNews coding standards
Initial Public Release
This code has been in use internally at DealNews for a while. This is the initial public release.