symfony php 更新内容,symfony-Symfony2更新bootstrap.php.cache

如果您运行composer run-script reset-bootstrap-cmd命令,您还将更新您的项目依赖关系,这不是此处的所需行为。 如果这样做,则必须测试新更改,以查看它们是否确实以某种方式影响了您的应用程序。

因此,如果您只想重建引导缓存文件,那么我建议您运行post-update-cmd命令。

因此,您应该使用:

composer run-script post-update-cmd

在我的情况下,它将执行以下脚本(请参阅composer.json):

"scripts": {

"post-install-cmd": [

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",

"Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrapSass"

]

}

请考虑,您也可以在其中创建一组新脚本,以仅重建引导文件并清除缓存,而无需安装资产,依此类推:

"scripts": {

"reset-bootstrap-cmd": [

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",

"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache"

]

}

然后... composer run-script reset-bootstrap-cmd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值