2

I am following this tutorial: http://tutorial.symblog.co.uk/docs/extending-the-model-blog-comments.html#doctrine-2-migrations

1) Installing Doctrine migrations bundle

1.1) - adding

 "doctrine/migrations": "dev-master",
 "doctrine/doctrine-migrations-bundle": "dev-master"

to composer.json

1.2) running

 php composer.phar update

2) adding

new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),

in AppKernel.php

3) Running

php app/console doctrine:migrations:diff

this should run the command and find the differences between the current entities and the database, yes? But I get an error instead:

 Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not found in D:\xampp\htdocs\symblog.dev\app\AppKernel.php on line 23

This is exactly the line of (2.)

Can you help me out? Any advice is welcome!

Hop hop
  • 841
  • 8
  • 21

1 Answers1

3

I think the bundle was renamed in the meanwhile. Try: (updated question):

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        //...
        new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
    );
}

See DoctrineMigrationsBundle documentation and DoctrineMigrationsBundle class.

gremo
  • 47,186
  • 75
  • 257
  • 421
  • I pasted the wrong namespace/class in my Question. Now fixed. The contents of AppKernel are exaclty as you say.. will add sources. – Hop hop Feb 06 '13 at 17:24
  • Thank you for your answer, checked the manual - no use, tried 2.1 Manual and Master branch -- also here is app kernel: [pastebin](http://pastebin.com/Gfbqp0N3) composer.json: [bastebin](http://pastebin.com/ch9nYN37) i have both bundles installed in vendor/doctrine: - doctrine-fixtures-bundle and doctrine-migrations-bundle, none of them works. Almost the same problem with fixtures. – Hop hop Feb 06 '13 at 17:25
  • 2
    @dopamine try running `composer dump-autoload`. – gremo Feb 06 '13 at 17:40
  • Generated new migration class to "D:/xampp/htdocs/symblog.dev/app/DoctrineMigrat ions/Version20130206185826.php" from schema differences. --------- It worked like a charm! – Hop hop Feb 06 '13 at 17:59