DoctrineDataFixtureModule icon indicating copy to clipboard operation
DoctrineDataFixtureModule copied to clipboard

Wrong Registering Fixtures configuration

Open pdrosos opened this issue 11 years ago • 3 comments

Hello,

The configuration for Registering Fixtures

return array(
      'data-fixture' => array(
            'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture',
      )
);

does not work and the fixtures files are not loaded. It should be

return array(
    'doctrine' => array(
        'fixture' => array(
             'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture',
        )
    ),
);

and then everything works fine. Please update the documentation :)

Thanks!

pdrosos avatar Nov 10 '14 13:11 pdrosos

@pdrosos can you PR the documentation directly? Editing from web also works :-)

Consider checking #37 - this may be my mistake (merging that PR)

Ocramius avatar Nov 10 '14 13:11 Ocramius

this is not working for me, and when a try to debug /vendor/hounddog/doctrine-data-fixture-module/src/DoctrineDataFixtureModule/Command/ImportCommand.php

on line 78 with print_r($this->paths); exit();

and run it in terminal i have a empty array return;

jl91 avatar Oct 05 '15 17:10 jl91

Currently the configuration needs to be just under the data-fixture key as outlined in https://github.com/Hounddog/DoctrineDataFixtureModule/blob/0.0.4/src/DoctrineDataFixtureModule/Service/FixtureFactory.php#L55

So therefore the documentation requires an update like

return [
    'data-fixture' => [
        'Foo_fixture' => '/path/to/Foo/Fixture'
    ]
];

manuakasam avatar Oct 08 '15 12:10 manuakasam