When you get a message like (e.g. when clearing the cache):
PHP Warning: require_once(/home/developer/my-project/bin/../var/bootstrap.php.cache): failed to open stream: No such file or directory in /home/developer/my-project/bin/console on line 10
Then the bootstrap.php.cache file was not created for different reasons. Normally it should be generated after running “composer install” in your project directory.
If you need to generate it manually, just run the following command in your Symfony project folder:
If you have the new Symfony 3 folder structure you need to add three arguments:
php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php var app new
The file will then be generate in var/bootstrap.php.cache instead of app/bootstrap.php.cache.