cakephp / queue

A queue-interop compatible Queueing library
MIT License
37 stars 19 forks source link

Cannot install on CakePHP 5.0.3 #143

Closed CriztianiX closed 5 months ago

CriztianiX commented 5 months ago

Trying to install on CakePHP 5.0.3 i get the following error:

root@d2e0c45349eb:/app# php composer.phar require cakephp/queue:2.0.1 --ignore-platform-reqs
./composer.json has been updated
Running composer update cakephp/queue
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - enqueue/simple-client[0.10.0, ..., 0.10.9] require symfony/config ^4.3|^5 -> found symfony/config[v4.3.0, ..., v4.4.44, v5.0.0, ..., v5.4.31] but the package is fixed to v7.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - enqueue/simple-client[0.10.16, ..., 0.10.18] require symfony/config ^5.1|^6.0 -> found symfony/config[v5.1.0, ..., v5.4.31, v6.0.0, ..., v6.4.0] but the package is fixed to v7.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - enqueue/simple-client 0.10.19 requires symfony/config ^5.4|^6.0 -> found symfony/config[v5.4.0, ..., v5.4.31, v6.0.0, ..., v6.4.0] but the package is fixed to v7.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - cakephp/queue 2.0.1 requires enqueue/simple-client ^0.10 -> satisfiable by enqueue/simple-client[0.10.0, ..., 0.10.19].
    - Root composer.json requires cakephp/queue 2.0.1 -> satisfiable by cakephp/queue[2.0.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Here the composer.json

{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "https://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {
        "php": ">=8.1",
        "aws/aws-sdk-php": "^3.297",
        "cakephp/cakephp": "^5.0.1",
        "cakephp/migrations": "^4.0.0",
        "cakephp/plugin-installer": "^2.0",
        "mobiledetect/mobiledetectlib": "^3.74"
    },
    "require-dev": {
        "cakephp/bake": "^3.0.0",
        "cakephp/cakephp-codesniffer": "^5.0",
        "cakephp/debug_kit": "^5.0.0",
        "josegonzalez/dotenv": "^4.0",
        "phpunit/phpunit": "^10.1.0"
    },
    "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.",
        "cakephp/repl": "Console tools for a REPL interface for CakePHP applications."
    },
    "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",
        "check": [
            "@test",
            "@cs-check"
        ],
        "cs-check": "phpcs --colors -p",
        "cs-fix": "phpcbf --colors -p",
        "stan": "phpstan analyse",
        "test": "phpunit --colors=always"
    },
    "config": {
        "platform-check": true,
        "sort-packages": true,
        "allow-plugins": {
            "cakephp/plugin-installer": true,
            "dealerdirect/phpcodesniffer-composer-installer": true
        }
    }
}

As you can see is a fresh cakephp install with aws-sdk library.

**Update 1: I've successfully installed with

markstory commented 5 months ago

Migrations has a dependency on symfony through phinx. I've been working on removing the dependency on phinx from migrations but it will be a while before that work is complete.

dereuromark commented 5 months ago

You could also use -W or other ways to resolve the lock issue. Closing then for now.