我目前正在使用Symfony2进行一个项目,我不需要Doctrine Bundle.我试图在很多场合删除它,但我不断收到错误,打破了安装.
我已经对app目录中的所有"Doctrine"实例进行了grep'ed,并在以下文件中注释掉了对Doctrine的任何引用:
然后我清除了缓存(当前在开发模式下工作,因此删除了缓存/ dev目录).
我目前得到的错误是:致命错误:第45行的/path/to/application/app/cache/dev/appDevDebugProjectContainer.php中找不到类'Doctrine\Common\Annotations\FileCacheReader'
这指的是缓存中的这个代码块
/**
* Gets the 'annotation_reader' service.
*
* This service is shared.
* This method always returns the same instance of the service.
*
* @return Doctrine\Common\Annotations\FileCacheReader A Doctrine\Common\Annotations\FileCacheReader instance.
*/
protected function getAnnotationReaderService()
{
return $this->services['annotation_reader'] = new \Doctrine\Common\Annotations\FileCacheReader(new \Doctrine\Common\Annotations\AnnotationReader(), '/path/to/application/app/cache/dev/annotations', true);
}
Run Code Online (Sandbox Code Playgroud)
但我无法找到一种方法来阻止将其添加到缓存中,因为我找不到与annotation_reader相关的任何设置.
谁能帮忙?