Closed Eugentis closed 2 years ago
It's good to be explicit :) Now anybody instantiating HydratorFactory knows exactly what is needed instead of wondering what should be set in the Configuration object. Anyway, the Configuration object could have been passed, or even not passed at all and relied on DocumentManager's getConfiguration (although this one's fishy as DocumentManager is not yet build when we're HydratorFactory is created).
Anyway, we're not going to change the ctor's signature as it is a BC break (as you noted) for no tangible gain.
Feature Request
Summary
Hi! While I am working with this lib I've detected that you have some strange constructor for HydratorFactory
My DI hits the problem with binding at this factory constructor
$hydratorDir
,$hydratorNs
,$autoGenerate
. I understand that it is problem of my DI (it is raw tool right now). But as I can see HydratorFactory works with these 3 params fromDoctrine\ODM\MongoDB\Configuration
. I suppose it will be better to use some more optimized constructor like:Or you can use it as dependency Configuration in this class In real this dependency exists but you hide it right now