Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Leverage DBAL's getNativeConnection() method#44309

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@derrabus
Copy link
Member

QA
Branch?5.3
Bug fix?yes
New feature?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

Doctrine DBAL 3 introduced a new driver middleware system that makes it difficult to unwrap the native PDO connection which we need for Messenger's Postgres transport. If an application would actually make use of the middleware system, accessing the PDO connection would become impossible for us.

Because of that, I have added a methodgetNativeConnection() to DBAL withdoctrine/dbal#5037. This PR leverages this new method.

@carsonbotcarsonbot changed the titleLeverage DBAL's getNativeConnection() method[Messenger] Leverage DBAL's getNativeConnection() methodNov 27, 2021
@carsonbotcarsonbot added this to the5.3 milestoneNov 27, 2021
@carsonbot
Copy link

Hey!

I think@tgalopin has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@nicolas-grekas
Copy link
Member

getWrappedConnection is also called in Cache and HttpFoundation (in 4.4 for both also)
Should these be updated too?

@derrabus
Copy link
MemberAuthor

In cache, we usegetWrappedConnection() to get the driver's connection, not the native one. This will still work reliably and unless we want to make the 4.4 branch compatible with DBAL 4, we don't need to change that.

In HttpFoundation, we let DBAL bootstrap a PDO Oracle connection.This code almost certainly breaks if you run it with DBAL 3. I have no Oracle test environment, I'm afraid. Otherwise, I would gladly fix it. 🙁

@fabpot
Copy link
Member

Thank you@derrabus.

@fabpotfabpot merged commitaf596bf intosymfony:5.3Nov 29, 2021
This was referencedNov 29, 2021
@derrabusderrabus deleted the improvement/get-native-connection branchDecember 3, 2021 22:50
@fabpotfabpot mentioned this pull requestDec 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.3

Development

Successfully merging this pull request may close these issues.

5 participants

@derrabus@carsonbot@nicolas-grekas@fabpot@stof

[8]ページ先頭

©2009-2025 Movatter.jp