1

我正在尝试用 adldap2/adldap2-laravel 和 adldap2/adldap2 替换 strebl/l5-ldap-auth 和 strebl/adldap 包,但是在尝试使用 Composer 安装时出现以下错误:

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

完整的错误信息如下:

sudo php composer.phar require adldap2/adldap2
Using version ^6.0 for adldap2/adldap2
./composer.json has been updated
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
- illuminate/support v5.2.25 requires illuminate/contracts 5.3.* -> no matching package found.
- Conclusion: remove laravel/framework v5.1.35
- Conclusion: don't install laravel/framework v5.1.35
- adldap2/adldap2 v6.0.0 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.1 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.2 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.3 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.4 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.5 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.6 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.7 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.8 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- adldap2/adldap2 v6.0.9 requires illuminate/support ~5.2 -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7].
- don't install illuminate/support v5.2.0|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.19|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.21|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.24|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.26|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.27|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.28|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.31|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.6|don't install laravel/framework v5.1.35
- don't install illuminate/support v5.2.7|don't install laravel/framework v5.1.35
- Installation request for laravel/framework == 5.1.35.0 -> satisfiable by laravel/framework[v5.1.35].
- Installation request for adldap2/adldap2 ^6.0 -> satisfiable by adldap2/adldap2[v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6, v6.0.7, v6.0.8, v6.0.9].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

我怀疑这条线

requires illuminate/contracts 5.3.* -> no matching package found

是问题的根源。

查看 Github 上最新的 Laravel 开发源代码,在我看来,最新版本的Illumination/contracts 是 5.2,而不是 5.3,所以可能是某个地方出现了拼写错误。

有什么方法可以覆盖这个要求,或者强制安装 adldap2/adldap2-laravel 和 adldap2/adldap2?

我的 composer.json 文件的当前内容如下:

{
    "name": "laravel/laravel",
    "minimum-stability": "stable",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "venturecraft/revisionable": "^1.27",
        "league/oauth2-server": "4.1.*",
        "illuminate/html": "5.0.*",
        "doctrine/dbal": "^2.5",
        "barryvdh/laravel-debugbar": "^2.2",
        "barryvdh/laravel-ide-helper": "*",
        "strebl/adldap": "4.0.*",
        "strebl/l5-ldap-auth": "2.1.*"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database",
            "app/Custom",
            "app/Traits"
        ],
        "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": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan clear-compiled",
            "php artisan ide-helper:generate",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}
4

1 回答 1

1

的版本5.2.25有一个不存在illuminate/support的依赖项()。这已在该软件包中得到纠正。illuminate/contracts5.3.*v5.2.27

你这里有另一个冲突,laravel/framework需要一个v5.1.*illuminate/supportadldap2/adldap2需要~5.2

所以,试着改变

"laravel/framework": "5.1.*",

"laravel/framework": "5.2.*",
于 2016-05-03T10:04:04.007 回答