admin icon indicating copy to clipboard operation
admin copied to clipboard

Should not use `HasLifecycleCallbacks` on traits

Open alexmerlin opened this issue 7 months ago • 0 comments

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.

alexmerlin avatar Jul 17 '24 18:07 alexmerlin