Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixtures path #10

theofidry opened this issue Jul 10, 2015 · 2 comments

Fixtures path #10

theofidry opened this issue Jul 10, 2015 · 2 comments


Copy link

theofidry commented Jul 10, 2015

As of now Alice fixtures must be placed under Resources/fixtures/orm.

Wouldn't it better to keep the DoctrineFixtures behavior which allows to specify the path where the loader is declared and with a default file path? And wouldn't it be better to keep the default path and make it configurable?

That would have the benefits to:

  • ease the transition if previously using another bundle to do this kind of task
  • keep the same convention while allowing one to define it's own convention and keeping the interesting feature you introduced which is loading fixtures for a given bundle
  • being more generic and not too much Symfony specific

Besides for the filtering you're using a file extension convention system with .yml, .dev.yml, .prod.yml and so on. This is fine if you don't have too much files. If you have even just 10 files for each, it's much more practical to use separate folders. To retake the example of what you can currently achieve with hautelook/AliceBundle, you can have:

├── Prod
|   ├── DataLoader.php
|   ├── ...
|   └── fixtures.yml
├── Inte
|   ├── DataLoader.php
|   ├── ...
|   └── fixtures.yml
└── Dev
    ├── DataLoader.php
    ├── ...
    └── fixtures.yml

And keep things clear.

@theofidry theofidry changed the title Command usage Fixtures path Jul 10, 2015
Copy link

PedroTroller commented Oct 28, 2015

@theofidry Thanks for your feedback. I totally agree with you, maybe the filter system can be more usefull if you can provide a pattern (ex: *.dev.yml ou Prod/*.yml).
And your idea to add a parameter to define the fixtures folder is good, but you have to keep the same convention between all bundles inside the same project...

Copy link

Einenlum commented Nov 1, 2015

I also like the idea of subdirectories. 👍

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

No branches or pull requests

3 participants