dotkernel / api

DotKernel's PSR-7 REST style API built around the Mezzio API skeleton.
https://docs.dotkernel.org/api-documentation/
MIT License
35 stars 5 forks source link

Issue #58: Use DatetimeImmutable instead of Datetime #62

Closed alexmerlin closed 3 years ago

alexmerlin commented 3 years ago

NOTE:

This fix modifies the ORM type of properties created and updated on all entitites that use TimestampAwareTrait. Their ORM type changes from datetime to datetime_immutable. To avoid return type conflicts, Doctrine's entity cache must be emptied after applying this fix.

Also, make sure you check if your code expects these properties to return an instance of DateTime and change those to DateTimeImmutable.