ZF2 will at some areas offer integration with Doctrine2. There are however no plans to ship Doctrine2 with ZF itself. Even if we would want to ship Doctrine2, it would be impossible because of contradicting licenses.
When talking about integration, you can think of:
- A ResourcePlugin for Zend\Application that bootstraps Doctrine
- An adapter for Zend\Authentication that relies on Doctrine
- A cache driver implements Doctrine\Common\Cache\Cache using Zend\Cache
- A Zend\Navigation adapter that uses Doctrine.
- A writer for Zend\Log
- A Doctrine-adapter that can be utilized by Zend\Paginator
- A Doctrine-adapter that can be utilized by Zend\Queue
- A Doctrine-version of Zend\Validator\Db
- A Doctrine-provider that can be utilized by Zend\Tool
Note: Since ZF2 is all new and cool and stuff, we forget about Doctrine version 1...
Labels:
None
11 Comments
comments.show.hideJan 12, 2011
Kai Uwe
An adapter for Zend\Paginator ?
Jan 12, 2011
Dolf Schimmel (Freeaqingme)
If anyone steps up to write that we'll be likely to have that too. Adding to the page.
Jan 13, 2011
Mike Willbanks
We already have one created for ZF 1.x, all we would need to do is update it for Doctrine 2.x and make a ZF 2.x version. Should be a rather quick change.
Jan 14, 2011
Goran Juric
Paginator for ZF1 and Doctrine 2 already exists. You can find it here https://github.com/beberlei/DoctrineExtensions
The problem is that to have support for pagination inside Doctrine 2 you need to use an extension. And I believe that the extension will be shipped with a ZF2 Paginator adapter once the ZF2 gets some traction.
Sep 19, 2011
Pablo Morales
Forked!
It's working perfect with Doctrine 2.0
Jan 15, 2011
Marc Bennewitz (private)
An cache driver implements Doctrine\Common\Cache\Cache using Zend\Cache
Jan 22, 2011
Wil Moore III (wilmoore)
I would also like to suggest Zend_Session_SaveHandler_Doctrine. Given Doctrine's DBAL, one could choose to save to Mongo or Redis as an alternative to something like memcache.
Jan 30, 2011
Benoît Durand
I suggest an ACL Doctrine-provider for Zend\Access if the feature provider exists.
Mar 01, 2011
Szurovecz János
It would be nice to use Zend\Form with entities also with Zend validators. Like in Symfony: http://docs.symfony-reloaded.org/guides/forms/overview.html#forms-and-domain-objects
I think validation should be in model level and forms have to use these validators (plus some optional validators). I started a project here: https://github.com/szjani/equcms
Probably I will modify the existing code because it could be better...
Sorry for my bad english.
Mar 15, 2011
Jurian Sluiman
For me one of the most wanted features, beside the Zend_Application resource plugin, is the tighter connection between Zend_Tool and the Doctrine cli commands. A Zend_Tool manifest with commands which proxy to Doctrine_Cli (or another method) might become very useful. Especially when in ZF2 more attention is paid to Zend_Tool and its features.
Oct 23, 2011
Ross Tuck
Regarding the list of integration points above:
Rather than building ORM specific implementations, it might be better to code against the Doctrine\Common\Persistence interfaces, creating one version for MySQL, MongoDB, Couch, etc. There's enough functionality there to implement most components.
For others that might take more specific query functions (Zend\Navigation, for example), we might still need specific ORM or MongoDB adapters. There should be a clear class hierarchy to make it clear which adapters are specific to a backend and those which are common.
Some of the components like Navigation and ACL might benefit from a hierarchy technique such as NestedSet or MP but it's not core in either project and shipping a third party one might be tricky. For others, like Paginator, there are existing classes; if we can find one with the correct licensing, it would save some work.
I'd love to see more done with using the ClassMetadata, such as automatically building validator chains or populating form options through relations but this should probably be a separate RFC.