码迷,mamicode.com
首页 > 系统相关 > 详细

[symonfy] An error occurred when executing the "'cache:clear --no-warmup'"

时间:2018-11-03 19:12:22      阅读:290      评论:0      收藏:0      [点我收藏+]

标签:san   php   opera   ref   time   when   script   cti   inf   

Symfony Version: 3.4.*

当运行 composer update 会出现

[RuntimeException]                                                                                                                                       
  An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                
                                                                                                                                                           
                                                                                                                                                           
                                                                                                                                                           
  PHP Fatal error:  require_once(): Failed opening required '/srv/www/htdocs/sfs/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistr  
  y.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR') in /srv/www/htdocs/sfs/var/cache/dev/ContainerFoco7kp/appDevDebugProjectContainer.php on  
   line 714                                                                                                                                                
                                                                                                                                                           
  In appDevDebugProjectContainer.php line 714:                                                                                                             
                                                                                                                                                           
    Compile Error: require_once(): Failed opening required '/srv/www/htdocs/sfs                                                                            
    /vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.                                                                            
    php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR')              

运行 composer update --no-scripts

而解决 doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php 文件不存在,

我是参考 doctrine common 2.9 has moved reflection

在 composer.json 中 添加

"conflict": {
    "doctrine/common": ">2.8"
}

然后运行 composer update --no-scripts

重新运行 composer require doctrine/common

wakasann@linux-2ywt:/srv/www/htdocs/sfs> composer update --no-scripts    
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 2 updates, 3 removals
  - Removing doctrine/reflection (v1.0.0)
  - Removing doctrine/persistence (v1.0.1)
  - Removing doctrine/event-manager (v1.0.0)
  - Updating doctrine/common (v2.9.0 => v2.8.0): Downloading (100%)         
  - Updating doctrine/dbal (v2.8.0 => v2.7.2): Downloading (100%)         
Writing lock file
Generating autoload files

看到 doctrine/common 降到 2.8.0了,直接运行 composer update 也不会报错了


参考

  1. doctrine common 2.9 has moved reflection
  2. An error occurred when executing the “‘cache:clear --no-warmup‘” command

[symonfy] An error occurred when executing the "'cache:clear --no-warmup'"

标签:san   php   opera   ref   time   when   script   cti   inf   

原文地址:https://www.cnblogs.com/fsong/p/9901588.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!