0
votes

I encountered this error while installing composer for my project. Here is my composer.json

{
    "name": "accessleader/project",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-0": {
            "": "src/",
            "SymfonyStandard": "app/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "php": ">=5.4.26",
        "symfony/symfony": "2.6.*",
        "doctrine/orm": "~2.2,>=2.2.3,<2.5",
        "doctrine/dbal": "<2.5",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "1.0.1",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0,>=3.0.12",
        "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
        "incenteev/composer-parameter-handler": "~2.0",

        "knplabs/knp-paginator-bundle": "dev-master",
        "friendsofsymfony/user-bundle": "1.3.5",
        "adesigns/calendar-bundle" : "dev-master",
        "friendsofsymfony/jsrouting-bundle" : "1.5.4",
        "liip/imagine-bundle" : "dev-master",
        "jordillonch/crud-generator" : "dev-master",
        "stof/doctrine-extensions-bundle": "~1.1@dev",
        "kms/froala-editor-bundle": "dev-master",
        "webfactory/exceptions-bundle" : "dev-master",
        "lexik/translation-bundle": "~2.0",
        "jms/i18n-routing-bundle": "dev-master",
        "hwi/oauth-bundle": "dev-master",
        "liuggio/excelbundle": "^2.0",
        "a2lix/translation-form-bundle": "dev-master",
        "besimple/i18n-routing-bundle": "dev-master",
        "knplabs/doctrine-behaviors": "~1.1",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "unifik/database-config-bundle": "dev-master",
        "beelab/recaptcha2-bundle": "^0.1.0",
        "dario_swain/ds-recaptcha-bundle": "dev-master",
        "avocode/form-extensions-bundle": "dev-master",
        "gos/web-socket-bundle": "~1.0",
        "knplabs/knp-snappy-bundle": "^1.4"
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3"
    },
    "scripts": {
        "post-root-package-install": [
            "SymfonyStandard\\Composer::hookRootPackageInstall"
        ],
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/DataBase/parameters.yml"
        }
    }
}

I am getting this error :

  1. Problem 1

    • Installation request for twig/extensions 1.0.1 -> satisfiable by twig/extensions[v1.0.1].
    • avocode/form-extensions-bundle dev-master requires twig/extensions ~1.2 -> satisfiable by twig/extensions[1.4.x-dev].
    • Can only install one of: twig/extensions[v1.0.1, 1.4.x-dev].
    • Installation request for avocode/form-extensions-bundle dev-master -> satisfiable by avocode/form-extensions-bundle[dev-master].
1
You've set the "twig/extensions": "1.0.1", but a bundle (avocode/form-extensions-bundle) require version 1.2 of twig/extensions so you should edit your composer.json in order to get v1.2.xThomas C
I edited my composer.json but the terminal shown me this error by typing composer install : 'Problem 1 - Conclusion: don't install symfony/symfony v2.6.13 - Conclusion: don't install symfony/symfony v2.6.12'mahdi
You have some confusion in your bundle usage, it appear that some require a certain version of symfony and some other may not be compatible with it, you use a lot of dirfferent bundles in your app do you know each of them ?Thomas C
I took this project to install the vendors and I do not know all the bundles usedmahdi

1 Answers

0
votes

You have pinned twig/extensions to version 1.0.1 but avocode/form-extension-bundle needs at least version 1.2 of the extensions to work. With a pinned version, other packages are not allowed to require a higher version.

"require":
  "twig/extensions": "1.0.1",

In order to resolve the dependency conflict you should require a higher, non-fixed version (i.e. allow all versions up to, but not including v2.0) than the one that your new dependency needs like this:

composer require 'twig/extensions:~1.2'

Alternatively you can remove the explicit dependency with twig/extensions because it is already a dependency of your new package and will be installed together with this package anyways:

composer remove 'twig/extensions'

Afterwards install your desired bundle:

composer require 'avocode/form-extensions-bundle:dev-master'