我有个问题.我想知道是否有任何替代方法来生成parameters.yml到parameters.yml.dist没有composer install / update.在作曲家安装/更新期间,分别生成和覆盖文件.但我希望不经过作曲家.我想知道是否有任何symfony控制台命令来实现这一目标.有人回答了吗?
你可以运行composer run-script post-install-cmd
原文链接:https://www.f2er.com/php/133602.html它可能会运行一些其他脚本(在默认的symfony配置中运行缓存,引导程序等).
如果您只想构建参数,请在您的composer / scripts部分中创建一个新部分.像这样:
"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","Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ],"post-update-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters","build-params": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" ] },...
然后只运行composer run-script build-params