简体   繁体   中英

Update to laravel 5.6 from 5.5 composer fails

I've been following the upgrade guide provided on the Laravel website from 5.5 -> 5.6 https://laravel.com/docs/5.6/upgrade

When I run composer install everything seems okay, but then I run composer update everything gets wonky, this seems to be something I should be concerned about, how do I fix it?

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

  Problem 1
    - Installation request for orchestra/testbench 3.6.2 -> satisfiable by orchestra/testbench[v3.6.2].
    - Conclusion: don't install laravel/framework v5.6.7
    - Conclusion: don't install laravel/framework v5.6.6
    - sofa/eloquence v5.5.1 requires sofa/eloquence-base 5.5.* -> satisfiable by sofa/eloquence-base[v5.5].
    - sofa/eloquence v5.5.1 requires sofa/eloquence-base 5.5.* -> satisfiable by sofa/eloquence-base[v5.5].
    - sofa/eloquence-base v5.5 requires illuminate/database 5.5.* -> satisfiable by laravel/framework[v5.5.19], illuminate/database[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36].
    - sofa/eloquence-base v5.5 requires illuminate/database 5.5.* -> satisfiable by laravel/framework[v5.5.19], illuminate/database[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36].
    - don't install laravel/framework v5.6.4|remove laravel/framework v5.5.19
    - don't install illuminate/database v5.5.0|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.16|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.17|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.2|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.28|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.33|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.34|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.35|don't install laravel/framework v5.6.4
    - don't install illuminate/database v5.5.36|don't install laravel/framework v5.6.4
    - orchestra/testbench v3.6.2 requires laravel/framework ~5.6.4 -> satisfiable by laravel/framework[v5.6.4, v5.6.5, v5.6.6, v5.6.7].
    - Conclusion: don't install laravel/framework v5.6.5
    - Installation request for sofa/eloquence ~5.5.1 -> satisfiable by sofa/eloquence[v5.5.1].

Here is what my composer file looks like

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.6.*",
        "ext-ldap": "*",
        "tymon/jwt-auth": "0.5.*",
        "adldap2/adldap2-laravel": "3.0.*",
        "barryvdh/laravel-cors": "*",
        "regulus/activity-log": "0.5.*",
        "backup-manager/laravel": "^1.2.2",
        "league/flysystem-sftp": "^1.0",
        "intervention/image": "^2.3",
        "sofa/eloquence": "~5.5.1",
        "sofa/eloquence-base":"~5.5",
        "shiftonelabs/laravel-nomad": "^1.0",
        "predis/predis": "^1.1",
        "shiftonelabs/laravel-cascade-deletes": "^1.0",
        "kalnoy/nestedset": "^4.3",
        "laravel/tinker": "^1.0",
        "guzzlehttp/guzzle": "~6.0",
        "pusher/pusher-php-server": "~3.0",
        "swiftmailer/swiftmailer":"^6.0",
        "fideloper/proxy":"~4.0"
    },
    "require-dev": {
        "laravel/dusk": "~2.0.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~7.0",
        "filp/whoops": "~2.0",
        "orchestra/testbench":"3.6.2",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*",
        "laracasts/generators": "dev-master as 1.1.4",
        "barryvdh/laravel-ide-helper": "^2.4"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || 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 ide-helper:generate",
            "php artisan ide-helper:meta",
            "php artisan optimize"
        ],"post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "optimize-autoloader": true
    },
    "extra": {
        "laravel": {
            "dont-discover": [
                "laravel/dusk"
            ]
        }
    }
}

It looks like sofa/eloquence 5.5.1 requires Laravel 5.5, which is preventing your upgrade to Laravel 5.6.

It looks like they released a package three days ago to be compatible with Laravel 5.6; you can edit your composer file to change its version to 5.6 and run composer update .

    "sofa/eloquence": "^5.6",
    "sofa/eloquence-base":"^5.6",

As per documentation says:

Laravel 5.6 requires PHP 7.1.3 or higher.

Try to change your composer.json with:

"require": {
    "php": ">=7.1.3",

Let me know if it helps

EDIT

try to change the config:

"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true,
    "minimum-stability":"dev",
    "prefer-stable": true
}

and check if all the required plugins support the latest version of laravel.

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