当前位置: 首页 > 知识库问答 >
问题:

CakeDC用户插件编写器安装

冯德宇
2023-03-14

我使用的是CakePHP3.6。2尝试使用Composer安装CakeDC用户插件时,会显示以下错误消息:

Using version ^7.0 for cakedc/users
./composer.json has been created
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
    - Installation request for cakedc/users ^7.0 -> satisfiable by cakedc/users[7.0.0].
    - cakedc/users 7.0.0 requires cakephp/cakephp ^3.6 -> satisfiable by cakephp/cakephp[3.6.0, 3.6.1, 3.6.2].
    - cakephp/cakephp 3.6.0 requires aura/intl ^3.0.0 -> satisfiable by aura/intl[3.0.0].
    - cakephp/cakephp 3.6.1 requires aura/intl ^3.0.0 -> satisfiable by aura/intl[3.0.0].
    - cakephp/cakephp 3.6.2 requires aura/intl ^3.0.0 -> satisfiable by aura/intl[3.0.0].
    - Conclusion: don't install aura/intl 3.0.0


Installation failed, deleting ./composer.json.

有谁能告诉我如何解决这个问题,同时仍然安装与作曲家?

我的composer.json:


{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "https://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {
        "php": ">=5.6",
        "cakephp/cakephp": "3.6.*",
        "cakephp/migrations": "^1.8.0",
        "cakephp/plugin-installer": "^1.0",
        "josegonzalez/dotenv": "3.*",
        "mobiledetect/mobiledetectlib": "2.*"
    },
    "require-dev": {
        "cakephp/bake": "^1.1",
        "cakephp/cakephp-codesniffer": "^3.0",
        "cakephp/debug_kit": "^3.15.0",
        "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 compatibility.",
        "phpunit/phpunit": "Allows automated tests to be run without system-wide install."
    },
    "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",
        "test": "phpunit --colors=always"
    },
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    }
}

共有2个答案

胥诚
2023-03-14

我刚刚测试了你的作曲家。json文件,它工作正常(composer安装)。您是否正在新环境中设置此项目?

  • 检查是否安装了所有CakePHP要求,如php intl扩展
澹台岳
2023-03-14

在CakeDC安装文档中,您需要运行composer require-CakeDC/users

您需要在与您的composer.json文件相同的目录中运行它。您的错误消息显示。/composer.json已创建。如果您在正确的目录中运行它,它将显示./composer.json已更新

或者,您可以将“cakedc/users”:“^7.0”添加到编写器中所需的包中。json手动,然后运行composer安装

"require": {
    "php": ">=5.6",
    "cakephp/cakephp": "3.6.*",
    "cakephp/migrations": "^1.8.0",
    "cakephp/plugin-installer": "^1.0",
    "josegonzalez/dotenv": "3.*",
    "mobiledetect/mobiledetectlib": "2.*",
    "cakedc/users": "^7.0"                 <- Add this line
},
 类似资料:
  • 我正在尝试在CakePHP3.1上安装Cake dc用户 这是我composer.json的一部分,我几乎可以肯定,这是正确的设置,将蛋糕版本设置为3.1: 我使用以下命令设置蛋糕: 作曲家创建项目cakephp/app ar2016-2 3.1.** 这就是我尝试使用composer安装DCUsers时得到的结果: 编写器需要cakedc/用户:~3.1。0 ./创作者json已经更新 加载具有

  • gitbook-plugin-write.md 官网:https://haomo-tech.com 作者:毫末科技 邮箱:hxg@haomo-studio.com

  • 当我运行composer.phar安装一切似乎不错: 但是现在,我想安装这个包:https://github.com/KnpLabs/KnpPaginatorBundle从https://packagist.org/packages/knplabs/knp-paginator-bundle 因此,我用新的require行更新composer.json文件。 } (我已经尝试了从Packegist的

  • Plugins can be either loaded by Smarty automatically from the filesystem or they can be registered at runtime via one of the register_* API functions. They can also be unregistered by using unregister

  • 本文向大家介绍基于jquery插件编写countdown计时器,包括了基于jquery插件编写countdown计时器的使用技巧和注意事项,需要的朋友参考一下 废话不多说,直接上代码: 先展示一下插件调用方式:  1. 需要先加载countdown插件对应的css文件,也就几行代码而已,可以不用引入,自己手写一样啦  css代码内容: 2.再加载js文件,在此之前得先引入jquery <scrip

  • jQuery 学习通常会经历三个阶段,会用 jQuery 是第一阶段,能抽象成插件是第二阶段…