我有两个项目。一个是我的application
,第二个是我想在未来的应用程序中使用的external module
。
我已经在GitHub上创建了我的外部模块,并包含在我的应用程序的composer.json
中。
我的external module
得到下载/克隆但required dependencies are not installed by composer
.
这是作曲家。
{
"name": "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.*",
"zf-commons/zfc-user": "1.4.4",
"doctrine/doctrine-orm-module": "~0.9.2",
"zf-commons/zfc-user-doctrine-orm": "1.0.*",
"zendframework/zend-developer-tools": "^0.0.2",
"username/GlideUser": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/username/GlideUser.git"
}
]
}
这是作曲家。
{
"name": "username/glide-user",
"description": "Module For Zend Framework 2",
"type": "library",
"license": "BSD-3-Clause",
"homepage": "https://github.com/username/GlideUser",
"keywords": [
"zf2",
"zfc-user",
"bjyauthorize"
],
"authors": [
{
"name": "Haris Mehmood",
"email": "abc@outlook.com",
"homepage": "abc.com",
"role": "Developer"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.3.3",
"bjyoungblood/bjy-authorize": "1.4.0"
},
"autoload": {
"psr-0": {
"GlideUser\": "src/"
}
}
}
当我运行composer install或composer update时,我希望安装bjyauthorize包,但composer忽略依赖并安装其他所有包。
我在这里做错了什么?尝试更新应用程序编写器中的以下行。json:
"username/GlideUser": "dev-master"
:
"username/glide-user": "dev-master"
这样,需要匹配外部模块的名称,即外部模块的composer.json中定义的名称。
虽然它看起来不能直接适用于未安装的外部模块的依赖,但它可能是原因。