Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // default annotation driver configuration which uses the simple annotation reader - only Doctrine Annotations supported
  2. $configuration->setMetadataDriverImpl(
  3.             $configuration->newDefaultAnnotationDriver(
  4.                  $zendConfig['doctrine']['entityPath']));
  5.  
  6. to
  7.  
  8. // Modified annotation reader configuration
  9. // Register the ORM Annotations in the AnnotationRegistry
  10.         \Doctrine\Common\Annotations\AnnotationRegistry::registerFile(APPLICATION_PATH. '/../library/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); // this file is included for backward compatibility
  11.        
  12. // Register the Symfony annotations
  13. \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace('Symfony\Component\Validator\Constraints', APPLICATION_PATH. '/../library');
  14.  
  15.         $reader = new \Doctrine\Common\Annotations\AnnotationReader();
  16.         $reader = new \Doctrine\Common\Annotations\CachedReader(
  17.                             new \Doctrine\Common\Annotations\IndexedReader($reader), new DoctrineArrayCache()
  18.         );
  19.        
  20.         $configuration->setMetadataDriverImpl(
  21.             new Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, $zendConfig['doctrine']['entityPath']));