If we
- have a PHP 7.0 +
- entity with
\DateTime property
- timestamp as raw ("database") data
- getter for property annotated with
: \DateTime return type
Expected result:
\DateTime entity is returned on getter call
Actual result:
Type error, since no data casting is involved on hyrating
As a result we have an inconsistent entity after hydration
From https://samdark.github.io/blog/hydrator/#comment-3306475417
If we
\DateTimeproperty: \DateTimereturn typeExpected result:
\DateTime entity is returned on getter call
Actual result:
Type error, since no data casting is involved on hyrating
As a result we have an inconsistent entity after hydration
From https://samdark.github.io/blog/hydrator/#comment-3306475417