实际上我已经尝试过了,但它不起作用。我想保留作者和描述。我当然可以不吃。然而,我想知道如何使这成为可能。
{
"name": "masterexploder/PHPThumb",
"type": "library",
"description": "A library for manipulating images in PHP.",
"homepage": "https://github.com/masterexploder/PHPThumb",
"keywords": ["image", "resize", "rotate"],
"require": {
"php": ">=5.3.0",
"symfony/filesystem": "2.2.*"
},
"authors": [
{
"name": "Ian Selby",
"email": "ian@gxdlabs.com"
}
],
"autoload": {
"psr-0": {
"PHPThumb": "src",
"PHPThumb\Tests": "tests"
}
}
},
{
"name": "alexshelkov/simpleacl",
"type": "library",
"description": "Simple Access Control List (ACL) for PHP.",
"keywords": ["ACL", "authorization", "permission"],
"homepage": "https://github.com/alexshelkov/SimpleAcl",
"require": {
"php": ">=5.3.0"
},
"authors": [
{
"name": "Alex Shelkovskiy",
"email": "alexshelkov@gmail.com",
"role": "Developper"
}
],
"autoload": {
"psr-0": {
"SimpleAcl": "SimpleAcl/"
}
}
}
Composer鼓励每个包一个库,所以在您的情况下,您最好为两个不同的库创建两个不同的包。
另见https://github.com/composer/composer/issues/1875
有一个解决方法,你创建一个"主"包,它"需要"你的两个子包。