private function initAnnotationReader()
    {
        AnnotationRegistry::registerFile(
            $this->getVendorDir().'/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
        );

        // annotations require custom autoloading
        AnnotationRegistry::registerAutoloadNamespaces([
            'JMS\Serializer\Annotation' => $this->getVendorDir().'/jms/serializer/src/',
        ]);

        AnnotationRegistry::registerLoader(function ($classname) {
            if (0 === strpos($classname, 'BackBee')) {
                return class_exists($classname);
            }

            if (0 === strpos($classname, 'Symfony\Component\Validator\Constraints')) {
                return class_exists($classname);
            }

            return false;
        });
    }