【问题标题】:Laravel: Your requirements could not be resolved to an installable set of packagesLaravel:您的需求无法解决为一组可安装的软件包
【发布时间】:2017-06-27 18:52:09
【问题描述】:

我正在尝试使用 composer update 来更新 Laravel。我正在关注https://laravel.com/docs/5.4/upgrade 的指南,但在运行 composer update 时遇到了问题。

*注意:我没有“bootstrap/cache/compiled.php”。

我已将 composer.json 更新如下:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.4.*",
    "illuminate/html": "5.0.*",
    "laravelcollective/html": "5.2.*"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}
}

控制台抛出以下错误:

【问题讨论】:

  • 您是否已经尝试将 laravelcollective/html 依赖项删除/更改为更新版本?

标签: php laravel composer-php


【解决方案1】:

您的 laravelcollective 包指向的版本需要 Laravel Core

手动更新,然后重新运行:

"laravelcollective/html": "^5.4.0"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-20
    • 1970-01-01
    • 2019-06-28
    • 1970-01-01
    • 2021-03-16
    • 2014-08-27
    相关资源
    最近更新 更多