composer-phpcakephp-3.xcakedc

CakeDC Users Plugin Composer installation


I'm using CakePHP 3.6.2 and trying to install the CakeDC Users plugin with Composer gives me the following error message:

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.

Can anyone tell me how to solve this while still installing with Composer?

My 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
    }
}


Solution

  • From the CakeDC installation docs, you need to run composer require cakedc/users.

    You need to run this in the same directory as your composer.json file. Your error message says ./composer.json has been created. It will say ./composer.json has been updated if you run it in the correct directory.

    Alternatively, you could add "cakedc/users": "^7.0" to the required packages in your composer.json manually, and then run composer install

    "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
    },