What is bootstrap.php.cache?

bootstrap.php.cache is a Symfony cache file in the app directory.

It contains a number of class definitions, so Symfony no longer needs to include all those classes from their source files. This increases performance.

The composer.json normally contains a post install/update command to build the bootstrap.php.cache file:


 If you didn't complete a composer update your installation may not run because of bootstrap.php.cache errors:

Warning: require_once(/vagrant/web/../app/bootstrap.php.cache): failed to open stream: No such file or directory in /vagrant/web/app_dev.php on line 20

So solve this, the composer problems should be fixed first.

The file can also be generated with:

php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php