Event logging fixes (not only) for PostgreSQL

Since I came accross this while working on Supporting PostgreSQL (again):

The Event log has issues with storing it’s data property on PostgreSQL. Probably not only there, now that I think about it… It stores that as a simple “array”, but currently objects end up there, so it should at least be using our ObjectArray to encode references to persistent objects (regardless of the DB used). That uses serialized data, so that will break on PostgreSQL if there are 0 bytes in there (yes, objects have that…).

Now, I switch that to use our own JsonArray Doctrine type, but… that would need a migration for the data that’s already there. Not an easy task, for PostgreSQL it would even be impossible (because the cut-off serialized data cannot be unserialized).

Now the question: Since the event logging feature is not supported officially and disabled out-of-the-box, do we need that? Or do we consider that broken and just fix it?

Here is the current PR:

Note: if we wanted, we could target this at master, since event logging is disabled on 2.0 anyway (see above)…