Jeff Huijsmans
Jeff Huijsmans

Reputation: 1418

composer update: Your requirements could not be resolved to an installable set of packages

I'm trying to upgrade from laravel 5.5 to 5.6. I've been using the upgrade guide for this.

First, I tried updating laravel/framework to 5.6.* and phpunit/phpunit to ~7.0.

This yields an error Your requirements could not be resolved to an installable set of packages.

I understand what this means, but the error log is really hard to parse, and I've been trying for a few hours now to change the composer.json file to a installable set of packages.
I haven't managed to fix this myself, so I come to you. Maybe some of you guys actually like fixing these problems...

So, my current composer.json, in all its glory:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.1",
        "laravel/framework": "5.6.*",
        "jenssegers/rollbar": "^1.4",
        "doctrine/dbal": "~2.3",
        "sensiolabs/security-checker": "^3.0",
        "guzzlehttp/guzzle": "~6.0",
        "mandrill/mandrill": "1.0.*",
        "lcobucci/jwt" : "^3.1",
        "predis/predis": "~1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~7.0",
        "phpspec/phpspec": "~4.0",
        "laravel/homestead" : "~4.0",
        "symfony/dom-crawler": "3.1.*",
        "symfony/css-selector": "3.1.*",
        "filp/whoops": "~2.0"
    }
}

And the current error:

➔ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install laravel/framework v5.6.15
    - Conclusion: don't install laravel/framework v5.6.14
    - Conclusion: don't install symfony/process v4.0.7
    - Conclusion: don't install laravel/framework v5.6.13
    - Conclusion: don't install symfony/process v4.0.6
    - Conclusion: don't install symfony/process v4.0.5
    - Conclusion: don't install symfony/process v4.0.4
    - Conclusion: don't install symfony/process v4.0.3
    - Conclusion: don't install symfony/process v4.0.2
    - Installation request for laravel/homestead ~4.0 -> satisfiable by laravel/homestead[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5].
    - Conclusion: don't install symfony/process v4.0.1
    - laravel/framework v5.6.0 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.1 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.10 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.11 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.12 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.2 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.3 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.4 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.5 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.6 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.7 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.8 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - laravel/framework v5.6.9 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
    - Conclusion: don't install symfony/process v4.0.0
    - Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.2, v5.6.3, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].

I really hope someone is able to decipher what composer means here. I would love to be able to do this myself as well, but it seems all the other solutions of this same question are really specifically for that composer.json only, and not a general answer..

Upvotes: 1

Views: 1156

Answers (1)

Jeff Huijsmans
Jeff Huijsmans

Reputation: 1418

For this situation, I had to do the following:

  • I updated php to ^7.1.3
  • sensiolabs/security-checker to ^4.1
  • phpspec to ~4.0
  • laravel/homestead to ~7.3
  • symfony/dom-crawler and symfony/css-selector to ^4.0
  • Remove references to composer optimize as that's now removed
  • Stop using configureMonologUsing(...) and create a custom logger class for Rollbar.

Thanks for all the help in the comments!

Upvotes: 2

Related Questions