Arrrgh Symfony2 and the recent Doctrine2 bundle wrapup screwed up?

After updating my Symfony2 things went horribly wrong in which case toke me 4 hours to resolve it. So here is what I got after the silly update:
> Installing/Updating DoctrineBundle
93be072b43f64f88dc946705610dc8d3b9eed833
HEAD is now at 93be072 Fix undefined variable. Fixes #18
PHP Fatal error:  Call to undefined method Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension::addUserProviderFactory() in /[....]/vendor/bundles/Doctrine/Bundle/DoctrineBundle/DoctrineBundle.php on line 39
PHP Stack trace:
PHP   1. {main}() /[....]/app/console:0
PHP   2. Symfony\Component\Console\Application->run() /[....]/app/console:22
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /[....]/vendor/symfony/src/Symfony/Component/Console/Application.php:118
PHP   4. Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() /[....]/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:66
PHP   5. Symfony\Component\HttpKernel\Kernel->boot() /[....]/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:80
PHP   6. Symfony\Component\HttpKernel\Kernel->initializeContainer() /[....]/app/bootstrap.php.cache:513
PHP   7. Symfony\Component\HttpKernel\Kernel->buildContainer() /[....]/app/bootstrap.php.cache:779
PHP   8. Doctrine\Bundle\DoctrineBundle\DoctrineBundle->build() /[....]/app/bootstrap.php.cache:848

Fatal error: Call to undefined method Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension::addUserProviderFactory() in /[....]/vendor/bundles/Doctrine/Bundle/DoctrineBundle/DoctrineBundle.php on line 39

Solution:

If your current Symfony version is <=v2.0.9 DO NOT point your code to
Doctrine\Bundle\DoctrineBundle\
Symfony\Bundle\DoctrineBundle //This is still part of the Symfony core/name space.
Keep your Symfony2 version to
[symfony]
    git=http://github.com/symfony/symfony.git
    version=v2.0.9

And Doctrine to
         
[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.5

[doctrine]
    git=http://github.com/doctrine/doctrine2.git
    version=2.1.6
For more information please refer to http://symfony.com/blog/symfony-2-1-the-doctrine-bundle-has-moved-to-the-doctrine-organization Share this