Home > Back-end >  Composer error while trying to update Laravel from 5.4.36 to 5.5.0
Composer error while trying to update Laravel from 5.4.36 to 5.5.0

Time:07-08

I'm trying to update Laravel from 5.4.36 to 5.5.0.
The only changes i made in composer.json are:
"laravel/framework": "5.4.*" edited to "laravel/framework": "5.5.*"
"phpunit/phpunit": "~5.7" edited to "phpunit/phpunit": "~6.0"
added "filp/whoops": "~2.0" to "require-dev"-section and added

"post-autoload-dump": [
    "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
    "@php artisan package:discover"
]

to "scripts" block - as described on https://laravel.com/docs/5.5/upgrade#upgrade-5.5.0

Running composer update or composer update --with-all-dependencies will return the follwing:

$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires graham-campbell/htmlmin ^4.5 -> satisfiable by graham-campbell/htmlmin[v4.5.0].
    - Conclusion: don't install laravel/framework v5.5.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.4 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.5 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.6 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.7 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.8 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.9 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.10 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.11 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.12 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.13 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.14 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.15 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.16 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.17 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.18 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.19 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.20 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.21 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.22 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.23 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.24 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.25 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.26 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.27 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.28 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.29 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.30 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.31 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.32 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.33 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.34 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.35 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.36 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.37 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.38 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.39 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.40 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.41 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.42 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.43 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.44 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.45 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.46 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.47 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.48 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.49 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.50 (conflict analysis result)
    - Conclusion: don't install laravel/framework v5.5.1 (conflict analysis result)
    - graham-campbell/htmlmin v4.5.0 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.* -> satisfiable by illuminate/support[v5.1.1, ..., v5.4.36].
    - Only one of these can be installed: illuminate/support[v5.0.0, ..., v5.8.36], laravel/framework[v5.5.0, ..., v5.5.50]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Only one of these can be installed: illuminate/support[v5.2.43, ..., v5.6.7], laravel/framework[v5.5.0, ..., v5.5.50]. They all replace tightenco/collect and thus cannot coexist.
    - Root composer.json requires laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, ..., v5.5.50].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

My composer.json file:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.5.*",
        "doctrine/dbal": "^2.5",
        "akeneo-labs/spreadsheet-parser": "^1.2",
        "graham-campbell/htmlmin": "^4.5",
        "roumen/sitemap": "^2.6"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~6.0",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*",
        "laravel/browser-kit-testing": "1.*",
        "filp/whoops": "~2.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/Helpers/translation.php",
            "app/Helpers/global.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ],
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "allow-plugins": {
            "kylekatarnls/update-helper": true
        }
    }
}

CodePudding user response:

You might want to try updated graham-campbell/htmlmin to ^8.0 or something in between 8 and 4.5.

The error line here states that it is the offending package:

    - graham-campbell/htmlmin v4.5.0 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.* -> satisfiable by illuminate/support[v5.1.1, ..., v5.4.36].
  • Related