Answer the question
In order to leave comments, you need to log in
Is there a bundle for Symfony like DoctrineAuditBundle, but with the ability to generate a more extensive human-readable change text?
Needed to generate something like this text:
Order:
05/12/2019 - order creation - Product 1 added, Product 2 added, Product 3 added
05/13/2019 - order change - Product 2 - deleted, Product 4 changed to Product 5
Answer the question
In order to leave comments, you need to log in
This is fairly easy to do via Doctrine lifecycle events . Hang handlers on preUpdate
, pretPersist
, prePremove
, collect information from the events passed to you to form the log you need, then postFlush
form a log entry from the collected information and write it down.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question