我将一个站点复制到本地计算机上,导入数据库并在安装完成后运行"Composer install -with-依赖项“,然后进入本地站点并运行"drush updb -y”,它显示了一些错误和警告:
The following module is missing from the file system: aspambot [warning]
bootstrap.inc:268
The following module is missing from the file system: phpmailer [warning]
bootstrap.inc:268..。
PHP 27. include() /home/www/sites/zb/web/vendor/composer/ClassLoader.php:444
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Interface 'Doctrine\Common\Reflection\ClassFinderInterface'
not found in
/home/www/sites/zb/web/core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php,
line 14
The external command could not be executed due to an application [error]
error.
PHP Fatal error: Interface 'Doctrine\Common\Reflection\ClassFinderInterface' not found in /home/www/sites/zb/web/core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php on line 14我是Drupal的新手,所以请帮助我克服这些错误,我知道解决方案对某些人来说可能很简单,但我不知道该怎么做。谢谢!
发布于 2018-07-24 21:35:28
在composer文件中添加冲突项下的"doctrine/common":">2.8",然后运行composer update。
"conflict": {
"drupal/drupal": "*",
"doctrine/common":">2.8"
},发布于 2018-10-03 20:01:25
感谢您给出了https://www.drupal.org/project/drupal/issues/2986725的链接,在这里讨论了这个问题。
这一问题作为“按设计进行的工作”而结束。如果你看看最后几个关于这个问题的评论,你就会明白为什么。这个问题是由PHP缓存引起的。如果您清除缓存(或者重新启动PHP或重新启动计算机,或者在没有缓存中包含错误自动加载数据的Docker容器上使用PHP ),那么问题就解决了。
清除缓存比从未更新到当前版本的doctrine/common有更少的副作用。
https://drupal.stackexchange.com/questions/266221
复制相似问题