2
votes

Doctrine 2.4 has some interesting new features that I'd like to use in my current Symfony 2.3 project.

Is there a composer.json configuration to use doctrine 2.4 with Symfony? I can’t find a valid dependency list. If I specify the 2.4.3 version of doctrine/orm in my composer.json I get a composer update error because doctrine/doctrine-bundle does not allow a doctrine install > 2.3.

Doctrine 2.4 is mentioned in the Symfony2 docs but I haven't found a valid composer.json list.

Any help is appreciated.

Current composer.json

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Fraktl/EscapeWSSEAuthenticationBundle.git"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "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",
        "stof/doctrine-extensions-bundle": "dev-master",
        "friendsofsymfony/jsrouting-bundle": "~1.1",
        "friendsofsymfony/rest-bundle": "dev-master",
        "sprain/validator-bundle": "dev-master",
        "willdurand/geocoder-bundle": "@stable",
        "friendsofsymfony/user-bundle": "~2.0@dev",
        "escapestudios/wsse-authentication-bundle": "2.3.x-dev",
        "jms/serializer-bundle": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "2.2.*",
        "luxifer/doctrine-functions": "dev-master"

    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "minimum-stability": "dev",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    }
}
1
please show us your composer.jsonNextar
@Nextar added the composer.jsonSimon
Maybe updating your Symfony to 2.4.* helps. You can also try "doctrine/orm": "2.4.*",Javad

1 Answers

3
votes

composer.json:

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": "2.4.*",
    "doctrine/doctrine-bundle": "~1.2",
    ....

Then update your dependencys

$ composer update doctrine\orm

But ! im not sure, if it is supported because the symfony master is using the same version since 2.3 (symfony 2.5 composer.json)

"require": {
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "~1.2",