dty97501 2017-09-28 16:35
浏览 108
已采纳

升级Symfony 2.7时出现问题

Hi StackOverflow community,

I'm working on a project with Sf2 and CouchDB database. I try to update my Sf2.7 to the last version, but when i update to Sf2.8, I have an error on cache clean / warmup commands.

[Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to Doctrine\Common\Annotations\AnnotationReader::__construct() must be an instance of Doctrine\Common\Annotations\DocParser, instance of Doctrine\Common\Annotations\CachedReader given, called in /var/www/symfony/app/cache/dev/appDevDebugProjectContainer.php on line 766

I know that CachedReader gonna be deprecated, but I don't know where to search to solve this.

I can't find this kind of issue on GitHub couchdb-odm / odm-bundle repositories ...

Tell me if you want more informations about all versions, and thanks for your help !

Stack trace:

0 /var/www/symfony/app/cache/dev/appDevDebugProjectContainer.php(766): Doctrine\Common\Annotations\AnnotationReader->__construct(Object(Doctrine\Common\Annotations\CachedReader))

1 /var/www/symfony/app/bootstrap.php.cache(2248): appDevDebugProjectContainer->getDoctrineCouchdb_Odm_DefaultDocumentManagerService()

2 /var/www/symfony/vendor/doctrine/couchdb-odm-bundle/Doctrine/Bundle/CouchDBBundle/CacheWarmer/ProxyCacheWarmer.php(35): Symfony\Component\DependencyInjection\Container->get('doctrine_couchd...')

3 /var/www/symfony/vendor/sy in /var/www/symfony/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php on line 176

  • 写回答

1条回答 默认 最新

  • duanchun1852 2017-11-10 00:10
    关注

    You could always overwrite the service definition and remove the argument causing the issue

    <service id="doctrine_couchdb.odm.metadata.annotation_reader" class="%doctrine_couchdb.odm.metadata.annotation_reader.class%" public="false">
    </service>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog