致命错误:在第16行的应用程序/控制台中找不到类'Symfony\Component\Console\Input\ArgvInput' [英] Fatal error: Class 'Symfony\Component\Console\Input\ArgvInput' not found in app/console on line 16

查看:671
本文介绍了致命错误:在第16行的应用程序/控制台中找不到类'Symfony\Component\Console\Input\ArgvInput'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以正常工作的symfony应用,今天我决定进行作曲家更新

I got a working symfony app, today I decided to do a composer update

composer update 可以在此处找到 https ://github.com/allan-simon/oauth2-symfony2-vagrant-fosuserbundle/commit/dfa25593f79c5595ca4759803ec1e998091c68b9 (主要是次要版本的更改,请注意,symfony的版本有所更改,但将其保留为2.6也会产生下面的问题)

the result of the composer update can ben found here https://github.com/allan-simon/oauth2-symfony2-vagrant-fosuserbundle/commit/dfa25593f79c5595ca4759803ec1e998091c68b9 (mostly change in minor version, note there's a change in version of symfony, but keeping it to 2.6 produce also the problems below)

现在在升级后出现此错误

And now after the upgrade I got this error

脚本Sensio\Bundle\DistributionBundle \Composer\ScriptHandler :: clearCache处理post-update-cmd事件以异常终止

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]                                                                                                
  An error occurred when executing the "'cache:clear --no-warmup'" command:                                         
  PHP Fatal error:  Class 'Symfony\Component\Console\Input\ArgvInput' not found in /vagrant/app/console on line 16  
  .   




  • 应用程序/控制台的内容未更改

  • 我尝试删除并重新创建bootstrap.cache,保持不变

  • 在供应商目录中,我确实说过 ArgvInput class

    • The content of the app/console has not changed
    • I've tried deleting and recreating the bootstrap.cache no change
    • In my vendor directory, I do have said ArgvInput class
    • 关于问题可能是什么的任何想法?

      Any idea on what can the problem be ?

      推荐答案

      问题是由于我的 composer.json 所在行

      "sensio/distribution-bundle": ">=2.3.7",
      

      因此它正在更新到最新版本(在撰写本文时为5.x),该版本与symfony 2.7及以下项目的文件结构不兼容

      So it was updating to the latest version (5.x at the time of writing) which is incompatible with the files structure of symfony 2.7 and below projects

      相反,我已将行放在

      "sensio/distribution-bundle": "~4.0",
      

      现在工作正常

      此处有更多解释

      https://github.com/sensiolabs/SensioDistributionBundle/issues/243

      这篇关于致命错误:在第16行的应用程序/控制台中找不到类'Symfony\Component\Console\Input\ArgvInput'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆