1

I've spent days now trying to sort out my deps in Symfony 2.0.15. I can't find a compatible list of bundles and I've been chasing commits around github trying to follow a chain of non-BC changes to get a list of versions that works for me. Eventually I chose to give up and upgraded to composer, only to find that some of the Doctrine core requires Symfony 2.1, yet some of the other Doctrine bundles require Symfony <2.1 and eventually I gave up on that as well.

Can someone with the following Bundles installed please let me know what stable versions they are using from their deps.lock?

[symfony]
git=http://github.com/symfony/symfony.git
version=v2.0.15

[twig]
git=http://github.com/fabpot/Twig.git
version=v1.8.2

[monolog]
git=http://github.com/Seldaek/monolog.git
version=1.0.2

[doctrine-common]
git=http://github.com/doctrine/common.git
version=2.1.4

[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.1.7

[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.1.7

[swiftmailer]
git=http://github.com/swiftmailer/swiftmailer.git
version=v4.1.7

[assetic]
git=http://github.com/kriswallsmith/assetic.git
version=cc2e9adb744df0704a5357adc1cf9287c427420f

[twig-extensions]
git=http://github.com/fabpot/Twig-extensions.git

[metadata]
git=http://github.com/schmittjoh/metadata.git
version=1.0.0

[SensioFrameworkExtraBundle]
git=http://github.com/sensio/SensioFrameworkExtraBundle.git
target=/bundles/Sensio/Bundle/FrameworkExtraBundle
version=origin/2.0

[JMSSecurityExtraBundle]
git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
version=origin/1.0.x

[SensioDistributionBundle]
git=http://github.com/sensio/SensioDistributionBundle.git
target=/bundles/Sensio/Bundle/DistributionBundle
version=origin/2.0

[SensioGeneratorBundle]
git=http://github.com/sensio/SensioGeneratorBundle.git
target=/bundles/Sensio/Bundle/GeneratorBundle
version=origin/2.0

[AsseticBundle]
git=http://github.com/symfony/AsseticBundle.git
target=/bundles/Symfony/Bundle/AsseticBundle
version=v1.0.1

[doctrine-mongodb]
git=http://github.com/doctrine/mongodb.git

[doctrine-mongodb-odm]
git=http://github.com/doctrine/mongodb-odm.git

[DoctrineMongoDBBundle]
git=http://github.com/doctrine/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=v2.0.1

[DoctrineMigrationsBundle]
git=https://github.com/doctrine/DoctrineMigrationsBundle.git
target=/bundles/Symfony/Bundle/DoctrineMigrationsBundle
version=origin/2.0

[doctrine-migrations]
git=http://github.com/doctrine/migrations.git

[doctrine-fixtures]
git=http://github.com/doctrine/data-fixtures.git

[DoctrineFixturesBundle]
git=https://github.com/doctrine/DoctrineFixturesBundle.git
target=/bundles/Symfony/Bundle/DoctrineFixturesBundle
version=origin/2.0

[DoctrineBundle]
git=http://github.com/doctrine/DoctrineBundle.git
target=/bundles/Doctrine/Bundle/DoctrineBundle

[FOSJsRoutingBundle]
git=http://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git
target=/bundles/FOS/JsRoutingBundle

[GedmoDoctrineExtensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
target=/gedmo-doctrine-extensions

[StofDoctrineExtensionsBundle]
git=http://github.com/stof/StofDoctrineExtensionsBundle.git
target=/bundles/Stof/DoctrineExtensionsBundle

With these combinations I get a constant set of errors due to classes not existing or renamed methods, which I then look up in the github repositories and try to fix to a commit/tag which resolves this error, only to get another set of errors because of other classes not existing or renamed methods. I can't go back to the stable state I had a few weeks ago because of the namespace changes to the Doctrine organisation - (@see What happened to Doctrine's Symfony Bundle repos?)

Alternatively I don't mind switching to composer; heres the composer.json that I tried, but doesn't work

{
"require": {
      "symfony/symfony" : "v2.0.15",
      "symfony/doctrine-bridge": "2.1.x-dev",
      "doctrine/common" : "2.1.4",
      "doctrine/orm" : "2.1.6",
      "symfony/finder" : "v2.0.15",

      "symfony/assetic-bundle" : "2.0.x-dev",
      "twig/extensions" : "dev-master",
      "jms/security-extra-bundle" : "1.0.x",
      "sensio/framework-extra-bundle" : "2.0.x-dev",
      "sensio/distribution-bundle" : "2.0.x-dev",
      "sensio/generator-bundle" : "2.0.x-dev",

      "doctrine/doctrine-bundle": "v1.0.0-beta1",
      "doctrine/mongodb-odm-bundle": "v2.0.1",

},
"autoload": {
    "psr-0": {
        "Oh": "src/"
    }
}
}

Whenever I try to fix dependencies in the composer.json I seem to get in a cycle of upgrading and degrading the same packages over and over again but always getting the error "Your requirements could not be solved to an installable set of packages.". If someone could provide me with their composer.json setup using Symfony 2.0.15 with the Doctrine,MongoDB,DoctrineFixtures and DoctrineMigrations bundles I'd be most grateful.

Community
  • 1
  • 1
Ollie Harridge
  • 135
  • 1
  • 7

1 Answers1

2

Here's part of my working composer configuration:

{
    "require": {
        "php":              ">=5.3.3",
        "symfony/symfony":  "2.0.15",
        "doctrine/orm":     "2.1.7",
        "twig/extensions":  "*",

        "symfony/assetic-bundle":         "2.0.x-dev",
        "sensio/generator-bundle":        "2.0.*",
        "sensio/framework-extra-bundle":  "2.0.*",
        "jms/security-extra-bundle":      "1.0.*",

        "stof/doctrine-extensions-bundle":     "*",
        "doctrine/doctrine-migrations-bundle": "2.0.*"
    }
}

I'm not using ODM though.

Jakub Zalas
  • 35,761
  • 9
  • 93
  • 125
  • 1
    thanks jakub. I guess I was trying to include too many packages in my composer. I did manage to get a working composer by replacing all the package versions with "*" to let it sort out it's own dependencies, but I guess it's risky using non-stable versions of everything. I've put my entire composer.json and AppKernel in a gist to help anyone else who might need it https://gist.github.com/2947908 – Ollie Harridge Jun 18 '12 at 11:17
  • If you want to lock on version(s) packagist.org can help you. You can see versions of your package and its dependencies. – Jakub Zalas Jun 18 '12 at 19:55
  • 1
    The trouble for me was that I was including packages in my composer.json that were already being included in other packages further down the line, and it's hard to see everything that's going to be installed. It would be handy if there was a tool to see all the dependencies in a tree structure, rather than having to look up each one and remember what depends on what. – Ollie Harridge Jun 18 '12 at 22:07