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 .
ArgvInput
class Any idea on what can the problem be ?
When passing an argument to the constructor, be sure that it respects the same rules as the argv one. It's almost always better to use the StringInput when you want to provide your own input. Symfony\Component\Console\Input\Input implements Symfony\Component\Console\Input\InputInterface Constructor. Constructor. Processes command line arguments.
When passing an argument to the constructor, be sure that it respects the same rules as the argv one. It's almost always better to use the StringInput when you want to provide your own input. Symfony\Component\Console\Input\Input implements Symfony\Component\Console\Input\InputInterface
The command doesn't run if the argument isn't provided; The argument is optional and therefore can be omitted. This is the default behavior of arguments; The argument can contain any number of values. For that reason, it must be used at the end of the argument list.
For example, php bin/console --iterations 5 app:greet Fabien is ambiguous; Symfony would interpret 5 as the command name. To avoid this situation, always place options after the command name, or avoid using a space to separate the option name from its value.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With