2016-11-05 269 views
0

我在爲我的項目安裝作曲家時遇到此錯誤。 這裏是我的composer.jsonSymfony:您的要求無法解析爲可安裝的「作曲家安裝」套件

{ 
    "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": "[email protected]", 
     "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" 
     } 
    } 
} 

我收到此錯誤:

  1. 問題的樹枝/擴展1.0.11

    • 安裝請求 - >由樹枝可滿足/擴展[V1.0.1]。
    • avocode/form-extensions-bundle dev-master需要twig/extensions〜1.2 - >可以通過twig/extensions [1.4.x-dev]來滿足。
    • 只能安裝其中的一個:twig/extensions [v1.0.1,1.4.x-dev]。
    • avocode/form-extensions-bundle dev-master的安裝請求 - >通過avocode/form-extensions-bundle [dev-master]可以滿足。
+1

你設置了「樹枝/擴展」:「1.0.1」,但束(avocode /形式的擴展束)要求的1.2版本twig/extensions,所以你應該編輯你的composer.json以獲得v1.2.x – Thomas

+0

我編輯了我的composer.json,但終端通過鍵入composer install向我顯示了這個錯誤:'問題1 - 結論:不要安裝symfony/symfony v2.6.13 - 結論:不要安裝symfony/symfony v2.6.12' – mahdi

+1

你的軟件包使用有一些困惑,它似乎有些需要symfony和其他一些特定版本的ma你不能與它兼容,你在你的應用中使用了很多不同的捆綁包你知道他們每個人嗎? – Thomas

回答

0

您已經固定twig/extensions1.0.1版本,但avocode/form-extension-bundle需要至少版本的擴展1.2工作。使用固定版本時,其他軟件包不允許需要更高版本。

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

爲了解決依賴性衝突,你應該要求更高,非固定版本(即允許所有版本,但不包括v2.0)不是一個新的依賴的需求是這樣的:

composer require 'twig/extensions:~1.2' 

另外,您可以刪除與twig/extensions明確的相關性,因爲它已經是你的新軟件包的依賴,將用這個包起來,反正安裝:

composer remove 'twig/extensions' 

然後安裝您需要的軟件包:

composer require 'avocode/form-extensions-bundle:dev-master' 
相關問題