You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classLoggableListenerextends \Gedmo\Loggable\LoggableListener
{
protectedfunctiongetLogEntryClass(LoggableAdapter$ea, $class)
{
returnself::$configurations[$this->name][$class]['logEntryClass'] ?? CustomLogEntry::class;
}
protectedfunctionprePersistLogEntry($logEntry, $object)
{
// set up additional fields in CustomLogEntry
}
}
If you use stof/doctrine-extensions-bundle.
stof_doctrine_extensions:
orm:
default:
loggable: trueclass:
loggable: 'App\EventListener\LoggableListener'# your extended listenerservices:
# register extended listener as alias to make sure your autoconfiguration does not register it twicestof_doctrine_extensions.listener.loggable: '@App\EventListener\LoggableListener'
Documentation https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/loggable.md
Contains how custom LogEntry entity should look, but what should be configured for it to work is completely missing.
I'm really struggling here. I though I figured it out, but ended with getting logged one change twice with the same version number.
Using with
stof/doctrine-extensions-bundle
, but it should be documented here too.The text was updated successfully, but these errors were encountered: