Skip to content
Advertisement

Symfony missing bootstrap.php.cache

I am using continuous deployment with jenkins on AWS. Everything is OK, but when I look on my page, there is this error:

Warning: require_once(/var/app/web/../app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/app/web/app.php on line 6 Fatal error: require_once(): Failed opening required '/var/app/web/../app/bootstrap.php.cache' (include_path='.:/usr/local/lib/php') in /var/app/web/app.php on line 6 

I know, it’s because I miss bootstrap.php.cache which should be generated by composer, but there is nothing.

In dockerfile I use RUN composer install --no-scripts --optimize-autoloader

and in entrypoint I have composer run-script post-install-cmd --no-interaction

Advertisement

Answer

Execute following command:

sudo php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement