Del*_*ium 6 php amazon-web-services symfony
我正在使用AWS上的jenkins进行持续部署.一切都很好,但是当我在我的页面上看时,会出现这样的错误:
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
Run Code Online (Sandbox Code Playgroud)
我知道,这是因为我错过了应该由作曲家生成的bootstrap.php.cache,但什么都没有.
在dockerfile中我使用 RUN composer install --no-scripts --optimize-autoloader
在入口点我有 composer run-script post-install-cmd --no-interaction
Ari*_*ris 14
执行以下命令:
sudo php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
Run Code Online (Sandbox Code Playgroud)
迟到的评论但是:
该boostrap.php.cache文件由 composer.json 脚本部分的钩子生成。进一步来说 :
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
Run Code Online (Sandbox Code Playgroud)
当使用--no-scripts这些钩子运行 composer install 时,不会执行。
但是,生成此文件是为了提高性能。As 与更高版本的 PHP 无关。你可以简单地删除它。
| 归档时间: |
|
| 查看次数: |
10964 次 |
| 最近记录: |