Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

doctrine migrations bundle not found - symblog

Tags:

php

symfony

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

like image 746
Robbo_UK Avatar asked Jan 31 '13 15:01

Robbo_UK


2 Answers

Found it the register path in the new version is

new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),

like image 64
Robbo_UK Avatar answered Oct 02 '22 17:10

Robbo_UK


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

like image 34
Roberto Rizzi Avatar answered Oct 02 '22 18:10

Roberto Rizzi