Reputation: 12149
I have managed to install doctrine migrations via the command line as part of the symfony blog tutorial.
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?
Upvotes: 5
Views: 4381
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
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
Reputation: 12149
Found it the register path in the new version is
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
Upvotes: 14