Php 无法将您的需求解析为可安装的软件包集。使用作曲家

Php 无法将您的需求解析为可安装的软件包集。使用作曲家,php,symfony,composer-php,Php,Symfony,Composer Php,我要求这位作曲家: "require": { "maximebf/debugbar": "^1.13.1", "kriswallsmith/assetic": "^1.2", "symfony/translation": "^4.2", "symfony/yaml": "^4.2", "symfony/config": "^4.2", "symfony/routing": "^4.2", "symfony/http-foundation":

我要求这位作曲家:

"require": {
    "maximebf/debugbar": "^1.13.1",
    "kriswallsmith/assetic": "^1.2",
    "symfony/translation": "^4.2",
    "symfony/yaml": "^4.2",
    "symfony/config": "^4.2",
    "symfony/routing": "^4.2",
    "symfony/http-foundation": "^4.2",
    "monolog/monolog": "^1.24",
    "leafo/scssphp": "^0.4.0",
    "ins0/google-measurement-php-client": "^2.1.0",
    "ruflin/elastica": "^6.1",
    "phpmailer/phpmailer": "^6.0",
    "mandrill/mandrill": "^1.0",
    "ezyang/htmlpurifier": "^4.10",
    "xamin/handlebars.php": "^0.10.4",
    "paypal/rest-api-sdk-php": "^1.11.0",
    "paypal/merchant-sdk-php": "^3.9.1",
    "zircote/swagger-php": "^3.0",
    "doctrine/cache": "^1.5",
    "symfony/http-kernel": "^4.2",
    "friendsofsymfony/http-cache": "^2.5.0",
    "kint-php/kint": "^3.1",
    "trello/trello": "^0.1.1",
    "giggsey/libphonenumber-for-php": "^8.8",
    "phpoffice/phpspreadsheet": "^1.6",
    "duccio/apns-php": "^1.0",
    "sentry/sentry": "^2.0.0",
    "symfony/console": "^4.2",
    "guzzlehttp/guzzle": "^6.3",
    "dompdf/dompdf": "^0.8.1",
    "mobiledetect/mobiledetectlib": "^2.8",
    "mpdf/mpdf": "^7.0",
    "ext-mysqli": "*"
  },
我有一个错误:

Problem 1
    - Conclusion: remove php-http/httplug v2.0.0
    - Installation request for friendsofsymfony/http-cache ^2.5.0 -> satisfiable by friendsofsymfony/http-cache[2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4].
    - sentry/sentry 2.0.0 requires php-http/async-client-implementation ^1.0 -> satisfiable by php-http/guzzle6-adapter[v2.0.1].
    - sentry/sentry 2.0.0 requires php-http/async-client-implementation ^1.0 -> satisfiable by php-http/guzzle6-adapter[v2.0.1].
    - php-http/guzzle6-adapter v2.0.1 requires php-http/httplug ^2.0 -> satisfiable by php-http/httplug[v2.0.0].
    - Conclusion: don't install php-http/httplug v2.0.0
    - Installation request for sentry/sentry ^2.0.0 -> satisfiable by sentry/sentry[2.0.0].
我不知道为什么会出现这个错误,因为我知道生成错误的行是:

"friendsofsymfony/http-cache": "^2.5.0",
当我移除它时,一切正常。知道composer为什么不想使用我当前的配置安装这个包吗

编辑:

更新到较新版本之前,my require的以前工作状态:

  "require": {
    "maximebf/debugbar": "1.13.1",
    "kriswallsmith/assetic": "1.2.*",
    "symfony/translation": "2.6.11",
    "symfony/yaml": "2.6.11",
    "symfony/config": "2.6",
    "symfony/routing": "2.6",
    "symfony/http-foundation": "2.6",
    "monolog/monolog": "^1.17",
    "leafo/scssphp": "0.4.0",
    "ins0/google-measurement-php-client": "2.1.0",
    "ruflin/elastica": "2.3",
    "phpmailer/phpmailer": "^5.2",
    "mandrill/mandrill": "^1.0",
    "ezyang/htmlpurifier": "4.8.*",
    "xamin/handlebars.php": "^0.10.4",
    "paypal/rest-api-sdk-php": "1.11.0",
    "paypal/merchant-sdk-php": "3.9.1",
    "zircote/swagger-php": "^1.0",
    "doctrine/cache": "^1.5",
    "symfony/http-kernel": "^2.6",
    "friendsofsymfony/http-cache": "^1.4",
    "kint-php/kint": "^2.1",
    "trello/trello": "^0.1.1",
    "giggsey/libphonenumber-for-php": "^8.8",
    "phpoffice/phpexcel": "^1.8",
    "duccio/apns-php": "^1.0",
    "sentry/sentry": "^1.8",
    "symfony/console": "^2.6",
    "guzzle/guzzle": "~3.9",
    "dompdf/dompdf": "^0.8.1",
    "mobiledetect/mobiledetectlib": "^2.8",
    "mpdf/mpdf": "^6.0",
    "ext-mysqli": "*"
  },

如果我从头开始运行您的代码,我会遇到一个不同且更清楚的问题:

  Problem 1
    - Installation request for sentry/sentry ^2.0.0 -> satisfiable by sentry/sentry[2.0.0].
    - sentry/sentry 2.0.0 requires php-http/async-client-implementation ^1.0 -> no matching package found.
  Problem 2
    - friendsofsymfony/http-cache 2.5.4 requires php-http/client-implementation ^1.0.0 -> no matching package found.
    - friendsofsymfony/http-cache 2.5.3 requires php-http/client-implementation ^1.0.0 -> no matching package found.
    - friendsofsymfony/http-cache 2.5.2 requires php-http/client-implementation ^1.0.0 -> no matching package found.
    - friendsofsymfony/http-cache 2.5.1 requires php-http/client-implementation ^1.0.0 -> no matching package found.
    - friendsofsymfony/http-cache 2.5.0 requires php-http/client-implementation ^1.0.0 -> no matching package found.
    - Installation request for friendsofsymfony/http-cache ^2.5.0 -> satisfiable
by friendsofsymfony/http-cache[2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4].
您的依赖项似乎需要提供
phphttp/
东西,这是虚拟包,可能由不同的lib提供

您可能有提供它的内容,并已将其删除,或者尝试在此更新中删除它?很难猜测


我建议删除
composer.lock
并从头开始。

删除
composer.lock
并从头开始将导致相同的错误。是的,关键是这(缺少依赖项)是您需要纠正的错误。有时,当您需要进行挂起的删除以满足锁定文件的要求时,结果会变得不清楚,无法继续。放下锁会告诉你你到底有什么潜在的问题。谢谢!但这并没有解决问题,而是造成了另一个问题。您是否可以添加一种方法来解决由于删除
composer.lock
而产生的问题?我不知道您的应用程序做了什么,也不知道它对相关功能有什么期望,因此我无法告诉您需要使用哪些包。如果您以前处于工作状态,请尝试找出是否删除了导致此问题的某个程序包,然后将其添加回。我编辑了我的OP以包含我以前的代码。现在存在的代码只是我的代码的更新版本。