Doctrine Behavioral Extension (Gedmo) - with 5.7.4

Permalink
I’m trying to integrate the Gedmo behavioral extentions into my Concrete5 5.7.4 installation.

I’ve found a solution by customizing half of the database classes and overriding the DatabaseServiceProvider. With this solution one customized EntityManager is shared across the entire installation. Sadly this solution is not update proof. The SimpleAnnotationReader which is used by default in the Connection.php class, does not let you use Doctrine extensions. As a consequence, I had to create an new AnnotationReader (as suggested in Gedmo Extentions Documentation) and alter all the annotations of Concrete5 entities in \Concrete\Core by changing them to ORM/Entity (Doctrine\ORM\Mapping as ORM).

I’ve found the following possible updateable approaches but none of them workt as expected:

Set EntityManager configuration with events (on_entity_manager_configure):
There is the oportunity to set or alter the EntityManager configuration on creation by registring a Symfony event. Problem : The Event doesn’t support the registration of a customized EventManager.

Overriding all Concete entities with not simplified Doctrine annotations (@ORM\Entity):
Because most of the enities are hard coded (have no Facade), many classes have to be customized. So I abandoned this approach, because it will result in a huge amount of customized code.

As of Concrete5 5.7.4.2 there is the possibility to create an EntityManager for the core, the application and for an infinit number of packages. Until now I haven’t found any examples of how to conifgure these EntityManagers correctly.

Has anybody found yet an update solution to integrate Doctrine Behavioral Extentions to a Concrete5 5.7.4.2 installation?