我有一个私有的 Satis 存储库,我在其中托管了几个私有包。我想将其中一个包作为我正在编写的包的依赖项包含在内,但是当我尝试运行composer update
(使用 composer 版本 1.4.1)时,它失败并显示以下消息:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package my/dependency-bundle could not be found in any version, there may be a typo in the package name.
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.
这是我的composer.json
:
{
"name":"my/bundle",
"description":"Provides a simple user provider",
"version": "3.0.0",
"keywords":["user", "Symfony2", "bundle"],
"homepage":"http://my.url.com/",
"authors": [
{
"name": "DIMMSum Information Technology",
"email": "dimmsum@dimmsum.com"
}
],
"repositories": [
{
"type": "composer",
"url": "https://my.url.com/packages/"
}
],
"require": {
"php": ">=7.0.1",
"my/dependency-bundle": "3.x-dev"
},
"require-dev": {
"symfony/framework-bundle": ">=2.8"
},
"autoload": {
"psr-0": { "My\\Bundle": "" }
},
"minimum-stability": "dev",
"target-dir": "My/Bundle"
}
这是运行的输出composer update -vvv
:
[vagrant@my-rhel7-vagrant my-bundle]$ composer update -vvv
Reading ./composer.json
Loading config file /home/vagrant/.config/composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
Reading /home/vagrant/.config/composer/composer.json
Loading config file /home/vagrant/.config/composer/auth.json
Loading config file /home/vagrant/.config/composer/composer.json
Loading config file /home/vagrant/.config/composer/auth.json
Reading /home/vagrant/.config/composer/auth.json
Reading /home/vagrant/.config/composer/vendor/composer/installed.json
Loading plugin Fxp\Composer\AssetPlugin\FxpAssetPlugin
Running 1.4.1 (2017-03-10 09:29:45) with PHP 7.0.10 on Linux / 3.10.0-514.10.2.el7.x86_64
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/vagrant/.cache/composer/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-10.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2017-01.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2017-04.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-archived.json from cache
Downloading http://packagist.org/p/provider-latest%248a761592e8d13b91d8ab79b2d284f47f569be9a701150af0b762648216abf987.json
Writing /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-latest.json into cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$framework-bundle.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$annotations.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$cache.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$asset.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$class-loader.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$config.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$dependency-injection.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$filesystem.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$finder.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$http-foundation.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$routing.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$security-core.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$security-csrf.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$stopwatch.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$templating.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$translation.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$lexer.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-apcu.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php54.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php55.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-psr$log.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$debug.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-paragonie$random-compat.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php56.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-util.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php70.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-ircmaxell$password-compat.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-psr$container.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$cache.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-psr$cache.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-psr$simple-cache.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-phpunit$phpunit.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$common.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$expression-language.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$yaml.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$var-dumper.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-phpdocumentor$reflection-docblock.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-phpdocumentor$type-resolver.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$console.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$serializer.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$form.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$property-info.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$validator.json from cache
Reading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$workflow.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.241 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package my/dependency-bundle could not be found in any version, there may be a typo in the package name.
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.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
如您所见,composer
甚至从未向我的存储库发送请求。
我已经验证了以下内容:
- 包名拼写正确
- 我的 Satis 存储库的 URL 可访问且正确
- 删除作曲家缓存并不能解决问题。
- 最小稳定性设置尽可能宽松(
"dev"
)。
为什么作曲家没有在我的存储库中查询依赖包,以及在解析依赖项时我需要更改什么以使其将我的 Satis 存储库包含在其存储库列表中?