CronExpressionType: new Exceptions for dbal4
Closes #42
I'm unsure about if the second exception is more InvalidFormat, but these one wants an $expectedFormat and I don't think that works for this
@loevgaard do you know how to please the psalm?
@loevgaard also "Code Coverage" doesn't seem to work on the Pull Requests anymore?
Because I'm pretty sure it is not going to like the return null at the end of this: (this case should not apply because it should be either one or the other)
if (class_exists(InvalidType::class)) {
throw InvalidType::new($value, CronExpression::class, ['string']);
} else if (method_exists(ConversionException::class, "conversionFailedInvalidType")) {
throw ConversionException::conversionFailedInvalidType($value, CronExpression::class, ['string']);
}
return null;
@loevgaard is it okay to ignore the psalm issues, or would there be a better way?
@loevgaard can you look at this so my projects can be updated to dbal4?
@loevgaard your input on fixing dbal4 support?