doctrine / couchdb-odm

A Document Mapper based on CouchDB
http://www.doctrine-project.org
MIT License
150 stars 53 forks source link

Issue with missed interface, PHPDriver and Chain loader. #55

Closed adyshev closed 11 years ago

adyshev commented 11 years ago

Hello.

After next commit - https://github.com/doctrine/couchdb-odm/commit/593b6fc509c377bf95e0ee642cebbd4a8f52c569

I found a lot of major issues:

  1. Driver interface was removed but still used in DriverChain.php.
  2. PHPDriver implementation was removed. This one impacts old-style metadata loading with static loadMetadata method from the entity class. So, now couchdb-odm does't support metadata loading without annotations out of the box. 3.(due to logic provided with this commit) Doctrine\ODM\CouchDB\Mapping\ClassMetadata usage should be replaced with (Doctrine\Common\Persistence\Mapping\ClassMetadata) thru all code.
  3. Also, this commit impacts integration with doctrine/couchdb-bundle integration (as result of implementation removing loadMetadataForClass(->Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator->findMappingFile) is incompatible with for example couchdb-bundle style of entity-mapping)

So, after this commit couchdb-odm package seems to be absolutely broken if application uses couchdb-client + couchdb-odm + couchdb-bundle components and not use annotations for metadata.

In my fork i already patch it, so you can check it before fixing. Hope it helps.

Thanks for you work,

stof commented 11 years ago

@adyshev please send a pull request with your fix. It will make the review easier.