Issue Bug Closed

#85083Validation error with DateTimeImmutable

Mathias Brodala 05/25/18, 14:57 updated 10/02/18, 10:46

Description

Having an object property typed as \DateTimeImmutable yields a validation error when using that object as Extbase controller argument:

> The given subject was not a valid DateTime. Got: ‘object’

This is caused by the DateTimeValidator which only checks for DateTime but not DateTimeImmutable. This should be changed to DateTimeInterface to cover both.

Reviews 2