php 如何在 travis 中运行 composer.phar 自我更新
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19064731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to run composer.phar self-update in travis
提问by Kim Stacks
I am facing warning statements in my travis builds.
我在我的 travis 构建中面临警告声明。
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/home/travis/.phpenv/versions/5.3.26/bin/composer.phar self-update" to get the latest version.
警告:composer 的这个开发版本已经超过 30 天了。建议通过运行“/home/travis/.phpenv/versions/5.3.26/bin/composer.phar self-update”来更新,获取最新版本。
How do I then run this?
那我该如何运行呢?
See an e.g. here
在这里看到一个例子
采纳答案by Kim Stacks
inside your travis.yml
在你的 travis.yml 里面
make sure you have this section
确保你有这个部分
before_install:
- php /home/travis/.phpenv/versions/5.3.26/bin/composer.phar self-update
in order to run the self-update properly
为了正确运行自我更新
回答by andig
It is not such a good idea to hard-code the php path as paths might change when Travis gets update. I suggest simply calling
对 php 路径进行硬编码并不是一个好主意,因为当 Travis 更新时路径可能会改变。我建议简单地打电话
composer self-update