dotkernel / admin

DotKernel Admin Application, built on top of Mezzio microframework and using Laminas components.
https://admin5.dotkernel.net
MIT License
30 stars 5 forks source link

Should not use `HasLifecycleCallbacks` on traits #266

Closed alexmerlin closed 3 months ago

alexmerlin commented 4 months ago

Nothing that would break the code - it's just a small issue I've identified during reviewing #265


Issue:

As explained here:

Class-level traits must be on the class, not on the trait. The trait does not exist at runtime, only its properties and methods.

Affected files:

https://github.com/dotkernel/admin/blob/5.0/src/App/src/Entity/TimestampsTrait.php#L10

Affected versions: 5.x

Solution:

Remove attribute #[ORM\HasLifecycleCallbacks] from src/App/src/Entity/TimestampsTrait.php becuase it does nothing.