安装cakephp/acl时发生恩怨

bogh5gae  于 2022-11-12  发布在  PHP
关注(0)|答案(1)|浏览(144)

我是使用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].

我的 composer ,乔森长这样.

{
    "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(如果你需要任何其他文件看等,请让我知道:)提前感谢!

aurhwmvo

aurhwmvo1#

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

composer require "cakephp/acl:0.7.0"

因此对于未来的版本,我建议检查github是否有正确的版本(如果您使用的是当时的Cakephp版本,那么应该是最新的),并相应地运行此命令。

相关问题