Skip to content

0.10.0

Compare
Choose a tag to compare
@odan odan released this 30 May 23:18
· 63 commits to master since this release

Breaking Changes

  • Removed ValidationResult methods

    • getMessage
    • setMessage
    • getCode
    • setCode
    • addValidationError
  • Change ResultTransformerInterface

    • Added optional ValidationException as second parameter to extract the error message and error code from the exception (and not from the ValidationResult anymore).

Migration

Old

if ($validationResult->isFailed()) {
    $validationResult->setMessage('Please check your input');

    throw new ValidationException($validationResult);
}

New

if ($validationResult->isFailed()) {
    throw new ValidationException('Please check your input', $validationResult);
}