Compatibility with Doctrine Common #16

Open
fckt opened this Issue Nov 17, 2011 · 4 comments

Projects

None yet

3 participants

@fckt
fckt commented Nov 17, 2011

PHPUnit 3.5.15 by Sebastian Bergmann.

............................................................... 63 / 158 ( 39%)
..........PHP Fatal error: Call to undefined method Doctrine\Common\Annotations\AnnotationReader::setDefaultAnnotationNamespace() in /var/local/olms.local/vendor/oxm/lib/Doctrine/OXM/Configuration.php on line 210

I use latest doctrine common (ae8493e66).

@jakzal
jakzal commented Jan 20, 2012

Tests fail because refactoring made in Doctrine common. setDefaultAnnotationNamespace() method doesn't exist anymore. Furthermore there are new methods added to several interfaces (listed below).

Doctrine\Common\Persistence\Mapping\ClassMetadataFactory

  • isTransient()

Doctrine\Common\Persistence\Mapping\ClassMetadata

  • getIdentifierFieldNames()
  • isAssociationInverseSide()
  • getAssociationMappedByTargetField()
  • getIdentifierValues()

Doctrine\Common\Persistence\ObjectManager

  • initializeObject()
  • contains()

Doctrine\Common\Persistence\ObjectRepository

  • getClassName()

I did some work on my fork to make it working with Doctrine 2.2 (installed via composer) but tests fail with older versions (installed via git submodules).

I also couldn't make it working without importing mapping namespace to the entities (use Doctrine\OXM\Mapping as OXM).

@fckt
fckt commented Feb 10, 2012

thank you! Great work! I'll test this as soon as possible!

@jakzal
jakzal commented Feb 10, 2012

Note that I just tried to see how much work is needed to make it working. I'm not sure if it's the right solution (that's why I didn't send PR).

@wcoka
wcoka commented Mar 6, 2012

I changed the reader class:

From Doctrine\Common\Annotations\AnnotationReader to Doctrine\Common\Annotations\SimpleAnnotationReader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment