phpro / zf-doctrine-hydration-module

Configurable Doctrine hydrators for ZF2
18 stars 33 forks source link

Naming Strategy + Filters Not Working #32

Closed matwright closed 8 years ago

matwright commented 8 years ago

I'm using this module as a dependancy of ZF Apigility Doctrine module. I have configured a naming strategy service and filters as per instructions however my custom service is never invoked.

This is quite tricky to debug as I'm not certain whether the issue is within this module or ZF Apigility Doctrine or indeed elsewhere. However the features are part of this module so I though I would report it here to see if anyone has any feedback to help with my debugging.

What I have found so far is that my initial DoctrineObject is instantiated and the various filters and strategies attached, this object is of type Phpro\DoctrineHydrationModule\Hydrator\ODM\MongoDB\DoctrineObject and appears to be correctly configured with my custom filters etc.

However when the actual extraction takes place the object upon which the extract method is called is of type : DoctrineModule\Stdlib\Hydrator\DoctrineObject

A completely different object (different type and hash id ) which does not hold any reference to my custom filters/namingStrategies.

Therefore my extracted data is neither filters, nor the naming strategy processed.

I am continuing to work on this, but if you have any pointers that would be most grateful.

matwright commented 8 years ago

I'm going to close this one almost as quickly as I opened it ! The issue was in my config files.