我正在尝试使用 NetBeans 中的骨架创建 Zend Framework 应用程序。当我运行 Composer 安装时,我收到以下错误消息:
"C:\php\php.exe" "C:\composer\composer.phar" "--ansi" "--no-interaction" "update" "--dev"
You are using the deprecated option "dev". Dev packages are installed by default now.
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
- This package requires php >=5.5 but your PHP version (5.4.42) does not satisfy that requirement.
Problem 2
- Installation request for zendframework/zendframework 2.5.1 -> satisfiable by zendframework/zendframework[2.5.1].
- zendframework/zendframework 2.5.1 requires php >=5.5 -> your PHP version (5.4.42) does not satisfy that requirement.
Done.
显然,Zend 框架只需要PHP 5.3+,这与上述情况相矛盾。我需要使用 PHP 5.4。
我composer.json
的如下:
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.5",
"zendframework/zendframework": "2.5.1"
}
}
如何使用骨架创建 PHP 5.4 / ZendFramework 2 应用程序?有解决方法吗?我是 ZendFramework 和作曲家的新手。