Fix XML and YAML drivers #18

Merged
merged 2 commits into from Jan 28, 2013

Projects

None yet

4 participants

@saem
saem commented Sep 27, 2012

....

Previously files were not correctly searched for when using automapping,
additionally all paths weren't traversed before throwing and exception,
lastly the exception factory method being used didn't exist in the
dependency (which has been added as a separate commit).

Saem Ghani added some commits Sep 25, 2012
Saem Ghani Fix XML and YAML drivers to correctly include files and throw excepti…
…ons.

Previously files were not correctly searched for when using automapping,
additionally all paths weren't traversed before throwing and exception,
lastly the exception factory method being used didn't exist in the
dependency (which has been added as a separate commit).
a0749ee
Saem Ghani Updates to use latest Doctrine/common faclities ef1b9d6
@lsmith77
Member

there is some infrastructure for this inside Common that could be used instead:
https://github.com/doctrine/DoctrinePHPCRBundle/tree/master/Mapping/Driver

@saem
saem commented Sep 27, 2012

I saw that too, I just wanted to get it working, and then look at making it better as I get more comfortable (baby steps and all). I was poking at the mongodb bundle when I noticed that they were inheriting from the base ODM which inherited from one in Common, IIRC -- which seems to be the same thing happening in the PHPCR.

Honestly, I'm new to Doctrine and Doctrine Bridge development, and wasn't quite sure how big a change it would be. From my brief look, I wasn't entirely sure I could just change up the service names (in the odm.xml), and then inherit as per the PHPCR/MongoDB bundles. This gives working code now.

For my next trick I'll work on the larger change you're alluding to.

@stof
Member
stof commented Sep 27, 2012

@saem inheriting the code of Common should be done first in the CouchDB ODM by refactoring it. Once done, you will not need any logic anymore here

@saem
saem commented Sep 28, 2012

I'm working on that now. A lot of code got blown away in the drivers, but it's all ultimately used in the ClassMetaDataFactory, which in the CouchDB ODM's case is quite old. I'm trying to wrap my head around all the nuances (currently have a failing test in terms of mapped super classes), but everything else seems to work. Once I get around that, it should be good to go.

Fair warning, the commit will be large!

@stof
Member
stof commented Sep 28, 2012

@saem the ClassMetaDataFactory should be refactored to use the code from Common too

@saem
saem commented Oct 1, 2012

This is a dependent pull request against couchdb-odm doctrine/couchdb-odm#47

Once that is patch should take care of any issues with bridging the bundle.

@beberlei beberlei merged commit 408c17e into doctrine:master Jan 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment