Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not found #71

eran-or opened this Issue Jan 1, 2013 · 8 comments


None yet
4 participants

eran-or commented Jan 1, 2013

I downloaded the symfony 2.1.6 with composer and DoctrineFixturesBundle with composer update and set in composer.json:
"doctrine/doctrine-fixtures-bundle": "*@dev" (because "dev-master" - doesn't worked).
when i run the php app/console doctrine:fixtures:load i get the fatal error.

I notice that the doctrine folder structure is : doctrine-fixtures-bundle -> Doctrine -> Bundle -> DoctrineFixturesBundle -> DoctrineFixturesBundle.php
if i change the line in the AppKernel.php from this:
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
to this:
new Doctrine\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
I end with an error.
than i notice there is an colsed issue about this so i changed back to :
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
i searched a lot in the web for answer. how can i fix it


lsmith77 commented Jan 1, 2013

the kernel class is indeed Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle
and looking at the composer.json it looks like it should properly configure the autoloading:


stof commented Jan 2, 2013

your installation path does not make any sense. There is no reason to have a folder named DoctrineFixturesBundle

eran-or commented Jan 2, 2013

i'v looked in the link it's seems that i have a newer version fo symfony . i'm using php 5.4.6. and used the composer to download the symfony 2.1.6 and i don't have any configuration problems . when i edit the composer.json i enter require row like :"doctrine/doctrine-fixtures-bundle": "@dev" . it download the folder structure that i mentioned .
this is my composer.json without the data fixture row . what is the right way to define the data fixture in it?
"name": "symfony/framework-standard-edition",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/" }
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.0.",
"twig/extensions": "1.0.
"symfony/assetic-bundle": "2.1.",
"symfony/swiftmailer-bundle": "2.1.
"symfony/monolog-bundle": "2.1.",
"sensio/distribution-bundle": "2.1.
"sensio/framework-extra-bundle": "2.1.",
"sensio/generator-bundle": "2.1.
"jms/security-extra-bundle": "1.2.",
"jms/di-extra-bundle": "1.1.
"kriswallsmith/assetic": "1.1.*@dev",

"scripts": {
    "post-install-cmd": [
    "post-update-cmd": [
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web"


eran-or commented Jan 4, 2013

i found in the web a solution that refer to windows but it work in ubuntu too . if any body have the same problem...
just add tow lines to composer.json:

"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures": "dev-master"

lewsid commented Jan 18, 2013

@stof: way to not be helpful

@eran-or: way to be 100% helpful! Swapping out:

"doctrine/data-fixtures": "dev-master"


"doctrine/doctrine-fixtures-bundle": "dev-master" composer.json and running an update fixed the issue. And for those curious like I was, due to conflicting documentation, the correct line to add to AppKernel's registerBundle() function is:

"new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),"


lsmith77 commented Jan 18, 2013

@lewsid can you submit a PR in case there are errors in the docs? if you don't know where to submit the fix just paste the URL to the docs here and I can tell you in what repo to do the correction. thx

lewsid commented Jan 18, 2013

@lsmith77 The docs are fine, the confusion was the result of my own error: viewing outdated Symfony documentation ( which references the old namespace. Indeed, the entire issue for me stemmed from working off the previous major version's documentation, while operating on a fresh pull of Symfony 2.1.7.


stof commented Jan 18, 2013

Ok, then closing this issue

stof closed this Jan 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment