contributte / apitte-skeleton

🎁 API / REST API / JSON API / PSR-7 / Middlewares project skeleton based on Nette Framework (@nette), Apitte (@apitte), Doctrine (@nettrine) and Contributte (@contributte) libraries by @f3l1x.
https://examples.contributte.org/apitte-skeleton/
MIT License
40 stars 17 forks source link

TypeError at App\Model\Database\Entity\User::getLastLoggedAt() #248

Open vanam opened 3 years ago

vanam commented 3 years ago
TypeError

App\Model\Database\Entity\User::getLastLoggedAt(): Return value must be of type ?App\Model\Utils\DateTime, DateTime returned

Exactly the same works at https://github.com/contributte/webapp-skeleton/blob/master/app/model/Database/Entity/User.php

I am missing what is different.

How to reproduce:

Workaround is to set dates to build-in \DateTime type.

vanam commented 3 years ago

One possible solution is to use \DateTimeInterface.

f3l1x commented 3 years ago

That's really weird.

fikusir commented 2 years ago

Same issue here. Installed skeleton via Composer with local DB (manually run the Migration script).