我在這裏有一個相當有趣的(和煩人的)問題。出於某種原因,PHP方法ReflectionClass::getDocComment()在我的生產環境中返回false(雖然實際上在課程中有塊註釋...)。Doctrine 2/PHP的 - getDocComment()總是返回false - AnnotationReader/DocParser失敗
導致主義AnnotationReader/DocParser失敗:
(教義\ COMMON \註解\ AnnotationReader.php:143)
public function getClassAnnotations(ReflectionClass $class)
{
$this->parser->setTarget(Target::TARGET_CLASS);
$this->parser->setImports($this->getImports($class));
$this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
}
我環顧四周,並沒有看到很多有關這個問題,所以我想知道爲什麼這是發生在我的生產服務器,當它不在我的本地環境。
- 難道是因爲一些PHP配置?
- 難道是因爲一些讀/寫/文件訪問權限(chown等)?
- 難道是因爲一些caching configuration ??
我必須說我已經沒有想法了。
任何幫助,非常感謝。
謝謝。
進一步的調查使我認爲這是關係到eAccelerator在: http://wildlyinaccurate.com/eaccelerator-and-doctrine-2/ && http://stackoverflow.com/questions/9676328/inconsistent-results-with-php-reflection-api 我會嘗試禁用它並查明是否這是問題。 – eightyfive 2012-04-06 17:56:26