安装cakephp / acl期间发生冲突

时间:2020-06-17 23:38:08

标签: windows cakephp acl

我是使用Powershell的Windows用户,想通过composer安装ACL。 我试过了 composer require "cakephp/acl:0.6.0" 并有此错误日志

./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
    - Can only install one of: cakephp/cakephp[4.0.4, 3.x-dev].
    - Can only install one of: cakephp/cakephp[3.x-dev, 4.0.4].
    - Can only install one of: cakephp/cakephp[3.x-dev, 4.0.4].
    - cakephp/acl 0.6.0 requires cakephp/cakephp ^3.8.2 -> satisfiable by cakephp/cakephp[3.x-dev].
    - Installation request for cakephp/acl 0.6.0 -> satisfiable by cakephp/acl[0.6.0].
    - Installation request for cakephp/cakephp (locked at 4.0.4, required as ^4.0) -> satisfiable by cakephp/cakephp[4.0.4].

我的作曲家。乔森看起来像这样。

{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "https://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {
        "php": ">=7.2",
        "cakephp/cakephp": "^4.0",
        "cakephp/migrations": "^3.0",
        "cakephp/plugin-installer": "^1.2",
        "mobiledetect/mobiledetectlib": "^2.8"
    },
    "require-dev": {
        "cakephp/bake": "^2.0.3",
        "cakephp/cakephp-codesniffer": "~4.0.0",
        "cakephp/debug_kit": "^4.0",
        "josegonzalez/dotenv": "^3.2",
        "phpunit/phpunit": "^8.5",
        "psy/psysh": "@stable"
    },
    "suggest": {
        "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
        "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan/Psalm compatibility.",
        "phpstan/phpstan": "PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code."
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Test\\": "tests/",
            "Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
        }
    },
    "scripts": {
        "post-install-cmd": "App\\Console\\Installer::postInstall",
        "post-create-project-cmd": "App\\Console\\Installer::postInstall",
        "post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
        "check": [
            "@test",
            "@cs-check"
        ],
        "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
        "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
        "stan": "phpstan analyse src/",
        "test": "phpunit --colors=always"
    },
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    },
    "minimum-stability": "dev"
}

我不知道关于3.x-dev和其他X( 如果您需要查看其他文件,请让我知道:) 预先感谢!

1 个答案:

答案 0 :(得分:0)

当我检查github.com/cakephp/acl时,在右边距中看到最新版本是0.7.0。 然后,当我运行指定该版本的composer调用时,它会正确安装;

composer require "cakephp/acl:0.7.0"

因此,对于将来的版本,我建议检查github以获取正确的版本(最新的,大概是如果您正在使用当时的Cakephp版本)并相应地运行此命令。