简体   繁体   English

升级Symfony 2.7时的问题

[英]Issue when upgrading Symfony 2.7

Hi StackOverflow community, 您好StackOverflow社区,

I'm working on a project with Sf2 and CouchDB database. 我正在使用Sf2和CouchDB数据库的项目。 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. 我尝试将Sf2.7更新到最新版本,但是当我更新到Sf2.8时,缓存清除/预热命令出错。

[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 [Symfony \\ Component \\ Debug \\ Exception \\ FatalThrowableError]类型错误:传递给Doctrine \\ Common \\ Annotations \\ AnnotationReader :: __ construct()的参数1必须是Doctrine \\ Common \\ Annotations \\ DocParser的实例,Doctrine \\ Common \\ Annotations的实例给定的\\ CachedReader,在第766行的/var/www/symfony/app/cache/dev/appDevDebugProjectContainer.php中调用

I know that CachedReader gonna be deprecated, but I don't know where to search to solve this. 我知道CachedReader将被弃用,但我不知道在哪里搜索以解决此问题。

I can't find this kind of issue on GitHub couchdb-odm / odm-bundle repositories ... 我在GitHub beddb-odm / odm-bundle存储库上找不到这种问题...

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)) 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() 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...') 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 在第176行的/var/www/symfony/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php中的3 / var / www / symfony / vendor / sy

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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM