-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Backporting the driver middlewares feature from 3.0 to 2.x #4495
Comments
There's no plan to tag any new |
Understood. Yes this request does not strictly falls into the "upgrade path" category, but it would help in transitioning from |
If Sentry implements what it's working on only for DBAL 3 which in turn requires PHP 7.3, and this is a useful feature for its users, it should motivate them to upgrade to the PHP and the DBAL versions that support it, so it will be a win-win for everybody. Backporting new features to the old versions and then maintaining multiple versions of everything by each party looks more of a lose-lose to me. |
I tend to agree with your thoughs, but there are a few key points about why we cannot do what you propose:
Anyway, I got the point, I don't want to press to backport this feature if you don't think it's worth doing this. I tried, I failed 😄 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
Summary
#4157 introduced the concept of middlewares to wrap the driver. This extension point is ideal for libraries that supports distributed tracing (OpenTracing, Sentry, etc) because it allows to measure the performances of queries at the lowest level possible. Unfortunately, the feature is present only from DBAL
3.0
onwards. Would be acceptable to backport it (just the middleware part of course, it's not necessary to backport also the moving of the portability layer which I didn't even investigate if it's feasible without BC breaks) to2.x
? Right now, on that version the only possible thing that can be done to wrap the driver is to listen to thepostConnect
event (which btw happens after a transaction has been started ifautocommit
isfalse
) and use the reflection to change a private property of theConnection
class.The text was updated successfully, but these errors were encountered: