Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Compatibility with Doctrine Common #16

Open
AlexeyFrolov opened this Issue · 4 comments

3 participants

@AlexeyFrolov

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

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).

@AlexeyFrolov

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

@jakzal

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

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
Something went wrong with that request. Please try again.