Can I pull a specific commit with composer?(我可以用作曲家拉一个特定的提交吗?)
问题描述
Is it possible to fetch a certain pull request with composer? Like a specific commit from a fork? What would the directive look like?
edit: context This would be helpful so I don't have to wait for a new tag to be created. I am certain it will be merged, however I don't know if when then devs will get a chance and I'd rather not put off the work flow I am in...
edit 2: now that I think about it, surely when developers make a fork of a public package they might need to test their own fork within a project or two before even pushing a pull request
edit 3: example I'm trying to pull this https://github.com/valorin/dispatcher/commit/c566eb6902f378abd59943e7ea09f61e734c8960 to no avail, I tried:
"valorin/dispatcher": "develop#c566eb6902f378abd59943e7ea09f61e734c8960"
and
"indatus/dispatcher": "develop#c566eb6902f378abd59943e7ea09f61e734c8960"
edit 4: great success
"require": {
"indatus/dispatcher": "dev-develop#c566eb6"
}
adding the dev-
prefix did the trick
You can't reference a pull request directly, but you can always get hold of a specific commit. You just need to find the commit hash that the pull request introduces. (If you're using github it's in the commits tab).
Then you'll need to use something like this in your composer.json -
"require": {
"mysoftware/thesoftware": "dev-master#3f38376d"
}
Where mysoftware/thesoftware
is the usual vendor/software name thing you would use, and the part after the '#' on the right-hand side is the specific commit hash you want.
这篇关于我可以用作曲家拉一个特定的提交吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以用作曲家拉一个特定的提交吗?
基础教程推荐
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01