l3pp4rd/DoctrineExtensions — Issue #244: Loggable: Ability to selectively skip saving of a version
Author: iamjochem
Created: 2012-01-27 13:06:05+00:00
State: open

hi,

I'm trying to figure out how I can programmatically skip the creation of a new version on a @Loggable document for a single commit - the reasoning behind this is to be able offer the user a checkbox next to a save button so that they can indicate 'this is a cosmetic change' ... this allows the user to fix small things like spelling in a document's content without muddying the version history (I am using the version history to show visually what has changed in the document content - the client doesn't want to present his users with superfluous information about grammatical fixes, capitalisation of letters, et al)

Obviously I would like to a have a simple function/method/interface/mechanism by which I can say : "don't version this particular document during this particular commit" ... this does not exist so I therefore wanted to ask:

1. is this something that you feel would be worthwhile feature?

- if yes, then do you have any hints as to how you think it should be implemented (so that I might have a crack at it)

- if no, then do you have any hint as to how I could implement it ... I currently thinking that if I implement just for my particular use case then I would create my own listener as a subclass of Gedmo\Loggable\LoggableListener with some extra logic in it ... and use that (IIRC the extension's configuration allows for overriding the listener class) ... does that sound viable?

thanks and regards,
Jochem