我想用这个:https://github.com/digitaldonkey/ethereum-php
所以我跑:composer require digitaldonkey/ethereum-php
,但我得到:
[InvalidArgumentException] 找不到包装digitaldonkey / ethereum-php在任何版本的最低稳定性(稳定)。检查包装拼写或最小稳定性
所以我想我需要指定一些其他分支,但是什么?
打开你的composer.json
,如果那个包没有稳定的版本,那么你必须将你的minimum-stability
改为dev
。
这个错误背后的原因是你的git repo不包含任何标签。
添加标签,如
git tag -a 1.0.0
git push --tags
现在你可以使用了
composer require digitaldonkey/ethereum-php
解释如果我们看到composer.json,您会发现包含包及其版本的require标记。例如
"require": {
"php": ">=7.0.0",
"afrazahmad/clearallcacheddata": "^1.0"
},
所以版本或标签很重要。希望能帮助到你。