-
Notifications
You must be signed in to change notification settings - Fork 34
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
Question: Why do we need to register migration commands as services with a factory? #29
Comments
It's been a while since I looked at that; if we can verify the service configuration really isn't needed, then it should be removed from docs 👍 |
I tried to search for a code that uses these services in the whole project, but I can't find one. How can we verify this for sure? |
@thexpand the example is just "how you might configure it in your project". If you don't need/want to register your commands as services, then that is fine, just skip that step. Perhaps clarification on the docs would help :) |
Oh and you won't find any services used in this project, if that's what you mean? This library does not consume services, it only provides factories so you can wire them into your container. |
@asgrim Ah, I understand now. But why would you need them as services in the first place? Can you give me an example of a possible scenario for this? The only possible use case I can think of is to execute a migration command in another symfony-console custom command that I have in the application. |
Generally when using |
I tested the migrations functionality with and without registering the migrations commands inside the factories. It works even without registering them, when I try to call
php vendor/bin/doctrine-migrations xxxxx
, wherexxxxx
is the command. So, why do we need to register the commands as services?The text was updated successfully, but these errors were encountered: