通过 composer 加载 zend-authentication
load zend-authentication via composer
我试图只加载 zend-authentication,但在执行时出现错误:
require zendframework/zend-authentication Using version ^2.6 for
zendframework/zend-authentication ./composer.json has been updated
Loading composer repositories with package information Updating
dependencies (including require-dev) Your requirements could not be
resolved to an installable set of packages.
Problem 1
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
- Installation request for doctrine/instantiator (locked at 1.1.0) -> satisfiable by doctrine/instantiator[1.1.0].
Installation failed, reverting ./composer.json to its original
content.
错误显示 php 版本可能有误,但如果我在本地主机上打开我的 wamp 起始页,它显示 php 版本 7.1.9。
为什么 composer 看到错误的 php 版本以及如何修复它?
当你 运行 composer 时,你 运行ning php-cli(命令行界面),在你的情况下,它与版本 apache (WAMP ) 使用。
您需要做的是更改 PATH 环境变量以针对您在 WAMP 中使用的 PHP 版本:http://www.forevolve.com/en/articles/2016/10/27/how-to-add-your-php-runtime-directory-to-your-windows-10-path-environment-variable/
此外,确保作曲家使用正确的版本:http://webdevzoom.com/how-to-install-composer-on-windows/#changing-phppath
我试图只加载 zend-authentication,但在执行时出现错误:
require zendframework/zend-authentication Using version ^2.6 for zendframework/zend-authentication ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1 - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement. - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement. - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement. - Installation request for doctrine/instantiator (locked at 1.1.0) -> satisfiable by doctrine/instantiator[1.1.0].
Installation failed, reverting ./composer.json to its original content.
错误显示 php 版本可能有误,但如果我在本地主机上打开我的 wamp 起始页,它显示 php 版本 7.1.9。
为什么 composer 看到错误的 php 版本以及如何修复它?
当你 运行 composer 时,你 运行ning php-cli(命令行界面),在你的情况下,它与版本 apache (WAMP ) 使用。
您需要做的是更改 PATH 环境变量以针对您在 WAMP 中使用的 PHP 版本:http://www.forevolve.com/en/articles/2016/10/27/how-to-add-your-php-runtime-directory-to-your-windows-10-path-environment-variable/
此外,确保作曲家使用正确的版本:http://webdevzoom.com/how-to-install-composer-on-windows/#changing-phppath