Closed mcanepa closed 6 days ago
It works with PATCH
but I believe this should work with PUT
as well
i have the same issue, did you solve?
The same thing happens to me. Has anyone discovered the solution?
There is nothing in this package behaving differently based on the HTTP request method.
The TimestampableEntity
only configures an object to be timestamped when it is created. Is something happening somewhere that is causing the createdAt
field to be set to null during an update?
Even adding the "Group" attribute so that it is not received by the "PUT" method, the created_at field is changed to null
If your entity has a setter for that field (which if you're using the TimestampableEntity
trait, it will), adding a dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS))
to that might help figure out what's changing it. Otherwise, to me it seems like this is an API Platform issue and not a bug here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm on a fresh install of API Platform (v3.2.7) and I'm using
TimestampableEntity
This is my entity (Greeting example)
and my config/services.yaml
It woks fine on
POST
operation, but it fails when doing aPUT
. I get this errorThe versions I'm using are: symfony 6.4.1, doctrine 2.12, gedmo 3.14