Robbo_UK
Robbo_UK

Reputation: 12149

doctrine migrations bundle not found - symblog

I have managed to install doctrine migrations via the command line as part of the symfony blog tutorial.

symblog tutorial part4

However im now getting class cannot be found error?

Fatal error: Class 'Doctrine\Bundle\DoctrineMigrationsBundle\DoctrineMigrationsBundle' not found in /media/sf_projects/symBlog/app/AppKernel.php on line 24

However im not sure why im getting it the path looks correct to me see screenshot below? enter image description here

Upvotes: 5

Views: 4381

Answers (3)

glen
glen

Reputation: 1725

i've submitted PR with this fix

https://github.com/dsyph3r/symblog-docs/pull/43

but seems author is not interesting maintaining it anymore, and the blog website he has up is outdated too regards what is in git, i.e git master has some of the fixes merged, but website is not regenerated.

so you should generate his howto yourself or you get stuck following the tutorial step by step with recent versions of symfony2/doctrine

Upvotes: 1

Roberto Rizzi
Roberto Rizzi

Reputation: 1533

You ought to change this path

new Symfony\Bundle\DoctrineMigrationsBundle\DoctrineMigrationsBundle() //old path

with this one

new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle()

and it should be right.

I got the same error in Symfony2 standard Edition (i'm using the 2.2 but I think that it's valid also for the 2.1). If it still doesn't work, you ought to install the git repository. You can do it through the official Symfony2's tutorial:

http://symfony.com/doc/current/cookbook/workflow/new_project_git.html

Upvotes: 2

Robbo_UK
Robbo_UK

Reputation: 12149

Found it the register path in the new version is

new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),

Upvotes: 14

Related Questions