CronExpressionBundle icon indicating copy to clipboard operation
CronExpressionBundle copied to clipboard

CronExpressionType: new Exceptions for dbal4

Open Hanmac opened this issue 1 year ago • 5 comments

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

Hanmac avatar Jun 04 '24 14:06 Hanmac

@loevgaard do you know how to please the psalm?

Hanmac avatar Jun 04 '24 14:06 Hanmac

@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;

Hanmac avatar Jun 04 '24 15:06 Hanmac

@loevgaard is it okay to ignore the psalm issues, or would there be a better way?

Hanmac avatar Jun 05 '24 12:06 Hanmac

@loevgaard can you look at this so my projects can be updated to dbal4?

Hanmac avatar Jun 17 '24 08:06 Hanmac

@loevgaard your input on fixing dbal4 support?

Hanmac avatar Aug 07 '24 13:08 Hanmac