APCu的Doctrine扩展错误:“ORM TreeListener不支持树类型:”

时间:2013-08-19 08:38:00

标签: php caching symfony doctrine apc

我有一个树型实体,在"嵌套"中配置了注释。树型。

我激活了PHP5.5 APCu扩展,过了一段时间,抛出了一个奇怪的异常: ORM TreeListener does not support tree type: (在&#34之后没有任何内容;类型:")

该网站可以在几个小时内正常运行,并在此之后完成。

如果我清除APCu缓存,则所有工作都可以正常工作几个小时。

这是stacktrace:

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);

你有什么提示可以帮助我解决这个错误吗?

由于

1 个答案:

答案 0 :(得分:1)

面临同样的问题。 见https://github.com/krakjoe/apcu/issues/35 只需将选项apc.serializer设置为php

即可