MARKER常量覆盖Symfony2错误 [英] MARKER constant override Symfony2 error
本文介绍了MARKER常量覆盖Symfony2错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以,我有一个类别实体设置,一个 parent_id
是自引用。但是由于某些原因,当我以表单保存条目时,我收到此错误。
So, I have a categories entity set up with a parent_id
being self-references. But for some reason when I save the entry in the form I get this error.
Fatal error: Cannot inherit previously-inherited or override constant MARKER from interface Doctrine\Common\Persistence\Proxy in /var/www/html/project/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Proxy.php on line 30
无法弄清楚它可能是什么。我根据教义文件设置了关系。
Can't figure out what it might be. I set the relationship up according to the Doctrine documentation.
/**
* Set parent
*
* @param string $parent
* @return Category
*/
public function setParent($parent)
{
$this->parent = $parent;
return $this;
}
/**
* Get parent
*
* @return string
*/
public function getParent()
{
return $this->parent;
}
任何帮助将不胜感激。
推荐答案
显然这是 Doctrine-bundle
中的错误。将其更新到版本1.2。*(并随后更新相关软件包)修复了问题。
Apparently it was a bug in Doctrine-bundle
. Updating it to version 1.2.* (and subsequently updating dependent packages) fixed the issue.
这篇关于MARKER常量覆盖Symfony2错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文