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

Return success when no fixtures to load #333

Open
simivar opened this issue Nov 10, 2020 · 2 comments
Open

Return success when no fixtures to load #333

simivar opened this issue Nov 10, 2020 · 2 comments

Comments

@simivar
Copy link

simivar commented Nov 10, 2020

Currently, when you run doctrine:fixtures:load and there are no fixtures to load the command returns 1 together with an error message.

In our use-case, we have created a skeleton application that has defined CI/CD templates and pre-installed bundles like this one. One of the steps in our CI is running doctrine:fixtures:load which in new projects that do not have any fixtures yet causes our CI step to fail.

What do you think about one of the possible solutions:

  1. add option to silence error on empty fixtures (--allow-empty or --silence-empty-error)
  2. return warning instead of error when no fixtures to load

I can try to prepare a Pull Request when you see some viable solution.

@greg0ire
Copy link
Member

Why not install the bundle but disable it in bundles.php instead?

@simivar
Copy link
Author

simivar commented Nov 11, 2020

If I understand you correctly we would have to change our CI/CD scripts too and we don't want to do that. We want to keep them the same as the skeleton ones and they do run doctrine:fixtures:load.

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

No branches or pull requests

2 participants