I have a class under namespace framework\ext\Library and use Doctrine\Common\Annotations\AnnotationReader, however when I try to create an instance of AnnotationReader, it throws a class not found exception.
namespace framework\ext\Library;
use Doctrine\Common\Annotations\AnnotationReader;
class CommonFunction {
public function getAnno(){
...
$annotationReader = new AnnotationReader();
...
}
}
the error throws
Fatal error: Class 'Doctrine\Common\Annotations\AnnotationReader' not found
I have try to remove the namespace of my CommonFunction
it works fine. How to fix it?