phpro / zf-doctrine-hydration-module

Configurable Doctrine hydrators for ZF2
18 stars 33 forks source link

Allow abstract factory for custom hydrator #40

Closed TomHAnderson closed 5 years ago

TomHAnderson commented 5 years ago

Instead of using ->get from the service manager use ->build and allow custom hydrators to be built by an abstract factory.

I would like to replace all my use of DoctrineObject hydrator from DoctrineModule but in order to do that I need to create individual hydrators and even these will not have the current hydrator configuration.

This simple change gives a lot of benefit and I ask that you post a new version with this asap.

veewee commented 5 years ago

Hi @TomHAnderson,

Thanks for the PR. Can you fix the travis remarks and provide tests for the 2 situations?

TomHAnderson commented 5 years ago

Extra test added and ServiceManager updated to support build()

veewee commented 5 years ago

Thanks for the PR!