Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom collection support #181

Merged
merged 2 commits into from Apr 4, 2017

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Feb 24, 2017

Supersedes #166 and #165. I took the liberty of cherry-picking the commits containing the feature and left out larger refactorings (except for ConfigurationFactoryTest which makes sense even at this point). I'll be cherry-picking refactorings into a separate PR along with #175.

Thanks @Bilge for doing the heavy lifting on this one!

@Bilge
Copy link
Contributor

Bilge commented Feb 27, 2017

Hey @alcaeus. Just wanted to drop a note to say thanks for taking care of this, and also, for keeping the other things like the test changes in tact! 👍

@@ -31,6 +31,12 @@
'hydrator_dir' => 'data/DoctrineMongoODMModule/Hydrator',
'hydrator_namespace' => 'DoctrineMongoODMModule\Hydrator',

'generate_persistent_collections' => Configuration::AUTOGENERATE_ALWAYS,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope for this PR, but is it common for other Zend modules to use AUTOGENERATE_ALWAYS for proxies and hydrators? ODM bundle for instance does the opposite relying on generating proxies/hydrators/collections during cache warmup. Maybe it's something that could be improved for 1.0.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by, other Zend moduels? This is the Zend module for Doctrine integration. I don't think AUTOGENERATE_NEVER is a good default since it means your application is broken by default. That's a production default, not a developer default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean other Doctrine-related Zend modules. And I must disagree that app is broken by default, in Symfony's case when cache is not there, it's generated and so are proxies/hydrators because that's hooked into cache-warming process by the bundle so the app is never broken by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not believe ZF has any such thing as a "cache-warming process". One would have to generate Doctrine assets manually, which is not a good default for development.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -162,8 +197,8 @@ public function getDriver()

/**
*
* @param boolean|int $generateProxies
* @return \DoctrineMongoODMModule\Options\Configuration
* @param boolean $generateProxies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alcaeus alcaeus merged commit c605088 into doctrine:master Apr 4, 2017
@alcaeus alcaeus deleted the custom-collection-support branch April 4, 2017 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants