1
votes

I keep getting the following warning when I run $ composer update:

PHP Warning: file_get_contents(app/bootstrap.cache): failed to open stream: No such file or directory in /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php on line 176 PHP Stack trace: PHP 1. {main}() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php:0 PHP 2. Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::doBuildBootstrap() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php:30 PHP 3. file_get_contents() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:176

Warning: file_get_contents(app/bootstrap.cache): failed to open stream: No such file or directory in /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php on line 176

Call Stack: 0.0002 227648 1. {main}() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php:0 0.0012 445872 2. Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::doBuildBootstrap() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php:30 0.0076 1631456 3. file_get_contents() /home/kevin/www/project1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:176

And here's as much of my composer.json I can post without violating my NDA:

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.4.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "~1.2",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~2.3",
    "sensio/framework-extra-bundle": "~3.0",
    "sensio/generator-bundle": "~2.3",
    "incenteev/composer-parameter-handler": "~2.0",
    "jms/security-extra-bundle": "1.*",
    "jms/serializer-bundle": "0.13.*@dev",
    "jms/di-extra-bundle": "1.*",
    "egeloen/ckeditor-bundle": "2.*",
    "helios-ag/fm-elfinder-bundle": "1.*",
    "mollie/mollie-api-php": "1.1.x",
    "mailchimp/mailchimp": "dev-master",
    "stof/doctrine-extensions-bundle": "~1.1@dev",
    "friendsofsymfony/user-bundle": "2.0.*@dev",
    "friendsofsymfony/rest-bundle": "1.3.*",
    "uecode/api-key-bundle": "dev-master"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
},
"config": {
    "bin-dir": "bin"
},
"minimum-stability": "dev",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml",
        "keep-outdated": true
    }
}

Any ideas?

1

1 Answers

0
votes

This happens occasionaly and I have to delete the cache's folder manualy /app/cache/ dev | prod | {dev_old or whatever}

or just simly run php app/console cache:clear