简体   繁体   中英

Your requirements could not be resolved to an installable set of packages. using composer

I have this composer require :

"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": "*"
  },

And I have the error :

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].

The thing I don't know why do I get this error, knowing that the line that generates the error is :

"friendsofsymfony/http-cache": "^2.5.0",

As when I remove it everything works correctly. Any idea why wouldn't composer want to install this package using my current configuration?

EDIT :

Previous working state of my require before updating to newer versions :

  "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": "*"
  },

If I run your code from clean slate I get a different and more clear problem:

  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].

Your dependencies seem to need something that provides php-http/ stuff, which are virtual packages, possibly provided by different libs.

You might have had something that provides it and removed it or trying to remove it on this update? Hard to guess.

I would recommend to erase the composer.lock and start from scratch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM