我在另一个私有存储库中引用一个私有存储库时遇到问题。
在这里查看我的核心软件包:
{
"name": "symfony/skeleton",
"type": "project",
"license": "MIT",
"description": "A minimal Symfony project recommended to create bare bones applications",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "^4.1",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.1",
"symfony/lts": "^4@dev",
"symfony/yaml": "^4.1",
"tomcorbett/reeta-core": "dev-master",
"wrep/daemonizable-command": "^2.1"
},
"require-dev": {
"symfony/dotenv": "^4.1",
"symfony/maker-bundle": "^1.5",
"symfony/profiler-pack": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"github-oauth": {
"github.com": "xxxxxxxx"
}
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"repositories": [
{
"type": "vcs",
"url": "git@github.com:tomcorbett/omnivore-api.git"
},
{
"type": "vcs",
"url": "git@github.com:tomcorbett/reeta-core.git"
}
],
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": true
}
}
}
这个作曲家在tomcorbett / reeta-core内部:
{
"name": "tomcorbett/reeta-core",
"description": "Main core library for sharing between API and web",
"type": "symfony-bundle",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-iconv": "*",
"friendsofsymfony/elastica-bundle": "^5.0",
"fzaninotto/faker": "^1.7",
"google/cloud-pubsub": "^1.3",
"msgphp/user-bundle": "^0.4.4",
"ramsey/uuid-doctrine": "^1.4",
"sensio/framework-extra-bundle": "^5.1",
"simple-bus/symfony-bridge": "^5.1",
"symfony/console": "^4.0",
"symfony/expression-language": "^4.0",
"symfony/form": "^4.0",
"symfony/framework-bundle": "^4.0",
"symfony/monolog-bundle": "^3.1",
"symfony/orm-pack": "^1.0",
"symfony/process": "^4.0",
"symfony/security": "^4.0",
"symfony/security-bundle": "^4.0",
"symfony/serializer-pack": "*",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/twig-bundle": "^4.0",
"symfony/validator": "^4.0",
"symfony/yaml": "^4.0",
"tomcorbett/omnivore-api": "dev-master"
},
"require-dev": {
"symfony/dotenv": "^4.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"github-oauth": {
"github.com": "xxxxxxxxx"
}
},
"autoload": {
"psr-4": {
"Reeta\\CoreBundle\\": "src/Reeta/CoreBundle"
}
},
"repositories": [
{
"type": "vcs",
"url": "git@github.com:tomcorbett/omnivore-api.git"
}
],
"extra": {
"symfony": {
"allow-contrib": false
}
}
}
由于某些原因,当我尝试执行以下操作时,在我的主程序包(第一个composer.json)中:
composer require tomcorbett/reeta-core
它给我以下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for tomcorbett/reeta-core dev-master -> satisfiable by tomcorbett/reeta-core[dev-master].
- tomcorbett/reeta-core dev-master requires tomcorbett/omnivore-api dev-master -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
如果有用,tomcorbett / omnivore-api项目的composer.json在这里:
{
"name": "tomcorbett/omnivore-api",
"type": "library",
"authors": [
{
"name": "Thomas Corbett",
"email": "tom@tomctech.com"
}
],
"autoload": {
"psr-4": {
"Omnivore\\": "src/Omnivore"
}
},
"require": {
"guzzlehttp/guzzle": "6.x"
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"autoload-dev": {
"psr-4": {
"Omnivore\\Tests\\": "tests/"
}
},
"minimum-stability": "dev"
}
这里Composer won't load private repository within private repository?有一个类似的问题,并且给出了写得很好的答案,但不能解决我的问题,只是说明它应该可以工作。
从主项目内部执行操作:
composer search tomcorbett/omnivore-api
我确实得到了
tomcorbett/omnivore-api
因此,这证明了作曲家已经意识到这一点,因此我不确定为什么它告诉我找不到该软件包。而且肯定有一个开发大师。
此外,当我在reeta-core项目中运行composer install时,它也会安装omnivore-api软件包。
我不想使用私人包装师或讽刺小说或其他任何东西,因为我相信我想做的事应该起作用,只是希望我做的事很愚蠢!这让我发疯了!
提前谢谢!