composer: Conflicting with __root__ dev-master regardless of what i do

I have checked the documentation on the versioning and in relation to this conflict I am not aware of where or what root is. I cannot see any reference to this in the docs but also I cannot figure out a way to get a version installed at all as it is always conflicting regardless of what I do. Any idea?

My composer.json:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "dev",
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "sensio/framework-extra-bundle": "^5.1",
        "sroze/companienv": "^0.0.7",
        "symfony/asset": "^4.0",
        "symfony/console": "^4.0",
        "symfony/flex": "^1.0",
        "symfony/form": "^4.0",
        "symfony/framework-bundle": "^4.0",
        "symfony/lts": "^4@dev",
        "symfony/monolog-bundle": "^3.1",
        "symfony/orm-pack": "^1.0",
        "symfony/security-bundle": "^4.0",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/translation": "^4.0",
        "symfony/twig-bundle": "^4.0",
        "symfony/validator": "^4.0",
        "symfony/yaml": "^4.0"
    },
    "require-dev": {
        "symfony/dotenv": "^4.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/",
            "MyreviewsShopifyBundle\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts",
            "Companienv\\Composer\\ScriptHandler::run"
        ],
        "post-update-cmd": [
            "@auto-scripts",
            "Companienv\\Composer\\ScriptHandler::run"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "id": "01C5NK1M0YHQ8NENGHTWQGZ2CA",
            "allow-contrib": false
        }
    },
    "repositories" : [
        {
            "type" : "vcs",
            "url" : "git@gitlab.com:bizmate/reviews.git"
        }
    ]
}

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.3
PHP version: 7.1.9
PHP binary path: /home/bizmate/.phpbrew/php/php-7.1.9/bin/php

When I run this command:

composer require myreviews/reviews:0.0.*

or

composer require myreviews/reviews:dev-master

I get the following output:

./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
    - don't install myreviews/reviews 0.0.2|remove __root__ dev-master
    - don't install myreviews/reviews v0.0.1|remove __root__ dev-master
    - Installation request for __root__ dev-master -> satisfiable by __root__[dev-master].
    - Installation request for myreviews/reviews 0.0.* -> satisfiable by myreviews/reviews[0.0.2, v0.0.1].


Installation failed, reverting ./composer.json to its original content.

And I expected 0.0.2 to be installed.

The package myreviews/reviews is privately hosted on gitlab and the composer.json on the project is

{
    "name": "myreviews/reviews",
    "type": "symfony-bundle",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "guzzlehttp/guzzle": "^6.3",
        "symfony/console": "^4.0",
        "symfony/flex": "^1.0",
        "symfony/framework-bundle": "^4.0",
        "symfony/lts": "^4@dev",
        "symfony/monolog-bundle": "^3.1",
        "symfony/orm-pack": "^1.0",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/yaml": "^4.0"
    },
    "require-dev": {
        "behat/behat": "^3.3",
        "behat/common-contexts": "^1.2@dev",
        "behat/debug-extension": "^1.0",
        "behat/mink-browserkit-driver": "^1.3",
        "behat/mink-extension": "^2.2",
        "behat/symfony2-extension": "^2.1",
        "jarnaiz/behat-junit-formatter": "^1.3",
        "mockery/mockery": "^0.9.9",
        "pdepend/pdepend": "^2.5",
        "phpmd/phpmd": "^2.6",
        "phpmetrics/phpmetrics": "^2.2",
        "sebastian/phpcpd": "^3.0",
        "sensiolabs/security-checker": "^4.0",
        "squizlabs/php_codesniffer": "^3.0",
        "symfony/dotenv": "^4.0",
        "symfony/phpunit-bridge": "^4.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "MyReviews\\ReviewsBundle\\": "src/",
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd",
            "security-checker security:check": "script"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "id": "01C4ZS37WH8SRYKJ62FM09J9CA",
            "allow-contrib": false
        }
    }
}

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (13 by maintainers)

Most upvoted comments

As far as I can tell, it’s failing because both your myreviews/reviews package and your root/composer.json declare a replace on

        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"

As they are both replacing this, it means they can’t be installed together I believe. That’d explain why you end up with - don't install myreviews/reviews v0.0.1|remove __root__ dev-master which means it needs to remove the root (which is forbidden) to install reviews and so it fails. Maybe try removing the replace in composer.json?

__root__ is the name of your root package, in case you don’t define a name in your package.json

I can’t say I see any reason why it would not be working, sorry 😞 I half expected something in how the Git tags/branches are named or detected, but the verbose logs are not showing anything of the kind. Perhaps @Seldaek is aware of anything I’m missing here?