我需要安装https://github.com/PHPGangsta/GoogleAuthenticator但是如果我运行composer require "PHPGangsta/GoogleAuthenticator:1.0.1"我会收到错误:
您的要求无法解决为一组可安装的 包裹。
问题1 - 请求的包 phpgangsta/googleauthenticator 1.0.1 存在为 phpgangsta/googleauthenticator[dev-master] 但这些是 被你的约束拒绝了。
这里是composer.json,其中仅对PHP版本有限制。
{
"require": {
"php": ">=5.6.1",
"league/oauth1-client": "^1.7",
"mongodb/mongodb": "^1.3",
"ruflin/elastica": "^5.3"
}
}
有人可以解释一下我出了什么问题吗?
我认为软件包中没有
1.0.1
版本。composer show --available phpgangsta/googleauthenticator
命令时,您可以看到可能的版本,但只有 dev-master
。composer require --prefer-dist phpgangsta/googleauthenticator:dev-master
命令安装。
不适用于 php8。 问题1 - phpunit/phpunit[6.0.0, ..., 6.5.14] 需要 php ^7.0 -> 你的 php 版本 (8.0.13) 不满足该要求。 - 根 Composer.json 需要 phpunit/phpunit ~6 -> 可通过 phpunit/phpunit[6.0.0, ..., 6.5.14] 满足。