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

Support for doctrine/dbal 3.X #407

Open
Clement-B opened this issue Dec 14, 2021 · 2 comments
Open

Support for doctrine/dbal 3.X #407

Clement-B opened this issue Dec 14, 2021 · 2 comments

Comments

@Clement-B
Copy link

Clement-B commented Dec 14, 2021

Hello,

In a move of upgrading my Symfony app from 5.3 to 5.4, I have encountered a compatibility issue with bundle doctrine/dbal in version 3.

How to reproduce bug :

  1. Install bundle on a fresh symfony app
  2. Configure DATABASE_URL with an invalid value (unknown database, hostname...)
  3. Clear cache

Observed result : Error while tying to conect to database SQLSTATE[HY000] [2002] ...
Expected result : No error

doctrine/doctrine-bundle seems to have updated his dependencies and now use lastest stable version of docrine/dbal.

Here is the changelog of the initiale version 3 of doctrine/dbal : https://github.com/doctrine/dbal/releases/tag/3.0.0

As you can see, there is an major modification (and maybe more) that impact this bundle that is :

  1. The Doctrine\DBAL\DBALException and Doctrine\DBAL\Driver\DriverException have been renamed to Doctrine\DBAL\Exception and Doctrine\DBAL\Driver\Exception respectively.

This exception is currently used in these file (even in the last version 5.2.0) :

} catch (DBALException $e) {

Depending of time necessary to fix this issue (I fixed it locally by just replace the namespace by the new one) we could eventually add doctrine/dbal in dependency with a version fixed to ^2.5 ?

@bartmcleod
Copy link
Collaborator

@Clement-B Does it also occur when you install a blank SF 5.2? It should be easy enough to fix when we create a 5.3 and 5.4 branch and update master to work with 6 if possible, but I am a bit short on time atm.

@Clement-B
Copy link
Author

@Clement-B Does it also occur when you install a blank SF 5.2? It should be easy enough to fix when we create a 5.3 and 5.4 branch and update master to work with 6 if possible, but I am a bit short on time atm.

I didn't give it a try but it happened when migrating an existing app from 5.3 to 5.4. I dont have time neither to test on a fresh install, maybe I will test it if I can in a few weeks.

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