Skip to content

Incompatibility with rich data objects (PHP 7+, Data casting) #3

Description

@scaytrase

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions