23
votes

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  
  .   
  • 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 ?

1

1 Answers

28
votes

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