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 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题