-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Migrations v3 - cli-config.php must return an instance of DependencyFactory #986
Comments
a list of BC breaks is available in https://github.com/doctrine/migrations/blob/master/UPGRADE.md In your specific case, you should refer to this section of the documentation https://www.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/configuration.html#advanced |
That specific part of the docs only says that the cli-config.php file has to return a DependencyFactory object, but as I said, that would break doctrine dbal and orm in projects which use those together with migrations. So my question is not how to solve that error, but how to get all three dbal, orm and migrations CLI tools work together, while they try to consume the same config file but expect something different to be returned from it. |
Hmm, that sounds like something that should be addressed somehow as it could be a common scenario |
Can you share the content (or the relevant parts) of your cli-config.php file? |
Can you please check if #989 solves your issue? |
Hey @goetas, thanks for addressing this so quickly. Yeah, on a first sight I would say that should solve the problem. This is my cli-config file, currently https://github.com/shlinkio/shlink/blob/develop/config/cli-config.php Basically it pulls off an EntityManager instance from a PSR-11 container and creates a HelperSet with it. |
Ok, then will add tests, probably will be part of 3.0.1 |
Solved in #989 |
Support Question
I have just updated to v3, and I was following this doc https://github.com/doctrine/migrations/blob/master/UPGRADE.md#upgrade-to-30 in order to get my config updated.
However, if I try to run any of the console commands, now I get this error:
This config file is shared with the rest of the doctrine tooling (dbal and orm), so changing it to return a DependencyFactory will make those tools no longer work.
Is there any way to make this file work with doctrine migrations 3, dbal and orm? If not, are you planning to provide some docs explaining how to work around it?
The text was updated successfully, but these errors were encountered: