我有一个配置了“嵌套”树类型注释的树类型实体。
我激活了 PHP5.5 APCu 扩展,一段时间后,抛出了一个奇怪的异常:(
ORM TreeListener does not support tree type:
“类型:”之后什么都没有)
该网站可以正常工作几个小时,然后再执行此操作。
如果我清除 APCu 缓存,几个小时内一切正常。
这是堆栈跟踪:
Stacktrace (most recent call first):
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/TreeListener.php", line 84, in getStrategy
throw new \Gedmo\Exception\InvalidArgumentException($managerName." TreeListener does not support tree type: {$config['strategy']}");
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php", line 846, in validate
return $this->listener->getStrategy($this->_em, $this->getClassMetadata()->name)->getName() === Strategy::NESTED;
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity/Repository/AbstractTreeRepository.php", line 52, in __construct
if (!$this->validate()) {
File "[...]/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php", line 689, in getRepository
$repository = new $repositoryClassName($this, $metadata);
File "[...]/app/cache/prod/jms_diextra/doctrine/EntityManager_520e1bbfadf9e.php", line 180, in getRepository
$repository = $this->delegate->getRepository($className);
File "[...]/src/Mapado/ActivityFrontBundle/Controller/ActivityController.php", line 85, in viewAction
$rubricRepo = $this->getDoctrine()->getManager('rubric')->getRepository('MapadoRubric:Rubric');
File "[...]/app/bootstrap.php.cache", line 2805, in handleRaw
$response = call_user_func_array($controller, $arguments);
File "[...]/app/bootstrap.php.cache", line 2779, in handle
return $this->handleRaw($request, $type);
File "[...]/app/bootstrap.php.cache", line 2908, in handle
$response = parent::handle($request, $type, $catch);
File "[...]/app/bootstrap.php.cache", line 2210, in handle
return $this->getHttpKernel()->handle($request, $type, $catch);
File "[...]/web/app.php", line 22, in null
$response = $kernel->handle($request);
你有什么提示可以帮助我解决这个错误吗?
谢谢