运行$ composer update
时,我一直收到以下警告:
PHP警告:file_get_contents(app / bootstrap.cache):无法打开流:/ home / kevin / www / project1 / vendor / sensio / distribution-bundle / Sensio / Bundle / DistributionBundle / Composer中没有此类文件或目录第176行的/ScriptHandler.php PHP堆栈跟踪: 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
警告:file_get_contents(app / bootstrap.cache):无法打开流:/ home / kevin / www / project1 / vendor / sensio / distribution-bundle / Sensio / Bundle / DistributionBundle / Composer /中没有此类文件或目录第176行的ScriptHandler.php
调用堆栈: 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
这就是我composer.json
我可以在不违反我的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
}
}
有什么想法吗?
答案 0 :(得分:0)
偶尔会发生这种情况,我必须手动删除缓存的文件夹 / app / cache / dev | prod | {dev_old或其他}
或只是简单地运行php app/console cache:clear