symfony2.3でdoctrine-fixtures-bundleを入れる

Twitter ツイート Hatena Bookmark ブックマーク

symfony2.3が6/10にリリースされていましたね。
ちなみにphp5.5.0もリリースされていますよー。今週末に色々と試してみようと思っている僕です。

さてさて、Symfony2使うときに必ずと言っていい程入れるバンドルの一つにdoctrine-fixtures-bundleがあります。
僕の記憶が正しければ、2.2までは以下をcomposer.jsonに追加すれば行けたはず

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
"require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",

    "gedmo/doctrine-extensions": "dev-master",
    "stof/doctrine-extensions-bundle": "dev-master"
    },

ただ2.3だとなぜか以下のようなエラーが。。。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$  composer update
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
    - Installation request for doctrine/doctrine-fixtures-bundle dev-master -> satisfiable by doctrine/doctrine-fixtures-bundle[dev-master].
    - doctrine/doctrine-fixtures-bundle dev-master requires doctrine/data-fixtures * -> no matching package found.
  Problem 2
    - doctrine/doctrine-fixtures-bundle dev-master requires doctrine/data-fixtures * -> no matching package found.
    - symfony/framework-standard-edition 2.3.x-dev requires doctrine/doctrine-fixtures-bundle dev-master -> satisfiable by doctrine/doctrine-fixtures-bundle[dev-master].
    - Installation request for symfony/framework-standard-edition 2.3.x-dev -> satisfiable by symfony/framework-standard-edition[2.3.x-dev].

なんかdoctrine/data-fixturesもcomposerで指定しろよってことっぽいので記載してあげます。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
"require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "doctrine/data-fixtures": "1.0.*@dev",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",

    "gedmo/doctrine-extensions": "dev-master",
    "stof/doctrine-extensions-bundle": "dev-master"
    },

これで無事インストールできましたー!

comments powered by Disqus
Built with Hugo
テーマ StackJimmy によって設計されています。