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

[DoctrineBridge] Allow doctrine_ping_connection to ping all connections#62788

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

Open
fpondepeyre wants to merge1 commit intosymfony:8.1
base:8.1
Choose a base branch
Loading
fromfpondepeyre:8.1

Conversation

@fpondepeyre
Copy link

QA
Branch?8.1
Bug fix?no
New feature?yes
Deprecations?no
IssuesN/A
LicenseMIT

The middleware DoctrinePingConnectionMiddleware now pings every registered EntityManager when no specific manager name is configured, instead of only the default one. Each closed manager is
reset using its own name so multi-connection setups don’t leave zombie connections. Added tests covering multi-manager pinging and targeted reset (not run locally because phpunit dependencies
couldn’t be fetched without network access).

@nicolas-grekas
Copy link
Member

But why? I mean: if there's no name configured, the default entity manager is used. So why ping should care about any others if it doesn't use them?

@fpondepeyre
Copy link
Author

@nicolas-grekas Thanks for taking a look at the MR and for the question!

Even when no manager name is configured, the middleware runs before the handler and doesn’t actually know which EntityManager the handler will use. In multi‑EM apps, handlers can inject a non‑default EM (e.g. reporting/archive). If only the default is pinged, those other connections can still be stale and you can hit “connection gone away” even though the middleware ran.

Pinging all managers in the “no name configured” case makes the default behavior safer for multi‑EM setups, while preserving the existing behavior for people who explicitly configure a single manager (they still only ping that one).

That said, if you prefer “default‑only unless explicitly configured”, it’s a reasonable position and I understand if the change is rejected on that basis.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

8.1

Development

Successfully merging this pull request may close these issues.

4 participants

@fpondepeyre@nicolas-grekas@carsonbot@shubh2294

[8]ページ先頭

©2009-2025 Movatter.jp