2

实际上我已经尝试过了,但它不起作用。我想保留作者和描述。我当然可以没有。但是我想知道如何使这成为可能。

{
    "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/"
        }
    }
}
4

1 回答 1

2

Composer 鼓励每个包一个库,因此在您的情况下,您最好为两个不同的库制作两个不同的包。

另外,请参阅https://github.com/composer/composer/issues/1875

有一种解决方法,您可以创建一个“需要”您的两个子包的“主”包。

于 2013-06-10T14:26:17.537 回答