2016-02-02 199 views
4

項目使用Symfony的2.8.2,PHP版本是5.6無法通過作曲家安裝DoctrineMigrationsBundle

我試圖安裝DoctrineMigrationsBundle和作曲家失敗,錯誤:

Problem 1 - doctrine/doctrine-migrations-bundle 1.0.0 requires doctrine/migrations [email protected] -> satisfiable by doctrine/migrations[v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0]. - doctrine/doctrine-migrations-bundle 1.0.1 requires doctrine/migrations [email protected] -> satisfiable by doctrine/migrations[v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0]. - doctrine/doctrine-migrations-bundle 1.1.1 requires doctrine/migrations ~1.0 -> satisfiable by doctrine/migrations[v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0]. - doctrine/doctrine-migrations-bundle v1.1.0 requires doctrine/migrations ~1.0 -> satisfiable by doctrine/migrations[v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0]. - doctrine/migrations v1.3.0 requires php ^5.5|^7.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - doctrine/migrations v1.2.2 requires php >=5.4.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - doctrine/migrations v1.2.1 requires php >=5.4.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - doctrine/migrations v1.2.0 requires php >=5.4.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - doctrine/migrations v1.1.0 requires php >=5.4.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - doctrine/migrations v1.0.0 requires php >=5.4.0 -> your PHP version (5.5.28) or "config.platform.php" value does not satisfy that requirement. - Installation request for doctrine/doctrine-migrations-bundle ^1.0 -> satisfiable by doctrine/doctrine-migrations-bundle[1.0.0, 1.0.1, 1.1.1, v1.1.0].

我composer.json「需要」塊:

"require": { "php": ">=5.3.9", "symfony/symfony": "2.8.*", "doctrine/orm": "^2.4.8", "doctrine/doctrine-bundle": "~1.4", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~5.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "~2.0", "sensio/generator-bundle": "~2.3", "friendsofsymfony/user-bundle": "[email protected]", "sonata-project/admin-bundle": "2.3.*", "sonata-project/doctrine-orm-admin-bundle": "2.3.*", "stof/doctrine-extensions-bundle": "^1.2" },

哪些錯誤與我的配置?我試圖回滾到sf2.3但仍然包着同樣的錯誤安裝

回答

10

在你composer.json你應該具備以下條件:

"config": { 
    "platform": { 
     "php": "5.3.9" 
    }, 
    "bin-dir": "bin" 
}, 

只是將其更改爲:

"config": { 
    "bin-dir": "bin" 
}, 

它應該工作。

+0

是的,它的工作原理,謝謝! –