-
Notifications
You must be signed in to change notification settings - Fork 15
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
slowly remove doctrine hard dependency #142
Milestone
Comments
I totally agree with this! |
For the record, here is connection params from Doctrine/Dbal/Connection: https://github.com/doctrine/dbal/blob/7fb00fdf7091a3ab0a4b6d0eed12170b4c7c2aa8/src/DriverManager.php#L46 |
pounard
added a commit
that referenced
this issue
Apr 19, 2024
pounard
added a commit
that referenced
this issue
Apr 19, 2024
pounard
added a commit
that referenced
this issue
Apr 19, 2024
pounard
added a commit
that referenced
this issue
Apr 19, 2024
pounard
added a commit
that referenced
this issue
Apr 19, 2024
pounard
added a commit
that referenced
this issue
Apr 22, 2024
pounard
added a commit
that referenced
this issue
Apr 22, 2024
pounard
added a commit
that referenced
this issue
Apr 22, 2024
pounard
added a commit
that referenced
this issue
Apr 23, 2024
pounard
added a commit
that referenced
this issue
Apr 23, 2024
pounard
added a commit
that referenced
this issue
Apr 23, 2024
pounard
added a commit
that referenced
this issue
Apr 23, 2024
Done ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, I have a plan, but we need to discuss it.
First, check #141 which unhardcode
doctrine/dbal
in many places.Then, if we continue on this path, we need to remove the
Doctrine\DBAL\Connection
everywhere we use it, and replace it usingMakinaCorpus\QueryBuilder\Bridge\Bridge
instead. That's the easy one.Now we are going to have one problem: backuppers and restorers are using
Doctrine\Persistence\ManagerRegistry
in order to create instances depending upon the database vendor. What I propose here would be:ConnectionConfig
class, with all properties we need (name, username, password, host, port, vendor name, etc...).interface ConnectionRegistry { getSession(string $name): Bridge; getConfig(string $name): ConnectionConfig; }
of our own, which would create theMakinaCorpus\QueryBuilder\Bridge\Bridge
depending upon theConnectionConfig
internals.Doctrine\Persistence\ManagerRegistry
and live with it, it's OK.By doing that, we would have no DBAL hardcoded dependency left, only the glue code for Symfony.
In the long term, future: we can implement a custom one based upon a configuration file, which would use doctrine to actually create the connection, but in the future this would help in order create a standalone docker container or package.
The text was updated successfully, but these errors were encountered: