allan.simon
allan.simon

Reputation: 4316

Fatal error: Class 'Symfony\Component\Console\Input\ArgvInput' not found in app/console on line 16

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

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

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  
  .   

Any idea on what can the problem be ?

Upvotes: 24

Views: 16924

Answers (1)

allan.simon
allan.simon

Reputation: 4316

The problem was caused because my composer.json had the line

"sensio/distribution-bundle": ">=2.3.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

instead I've put the line

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

and now it's working fine

more explanation here

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

Upvotes: 28

Related Questions