You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove @internal on methods in Doctrine\DBAL\Connection that could be reused in wrapper_class
Add the possibility to increment the transactionNestingLevel in a class that extends Doctrine\DBAL\Connection
Why
I'm developping a custom Doctrine\DBAL\Connection (for handling my own custom transaction management) and used the wrapper_class configuration parameter to setup my custom connection.
To do so, I extended the original Doctrine\DBAL\Connection and saw that:
Some methods have the @internal annotation:
a. convertException
b. getParams
The transactionNestingLevel property does not have the protected visibility and has no setter.
How
Remove the @internal annotation on convertException and getParams
Create a setter for transactionNestingLevel or change the property visibility to protected
The text was updated successfully, but these errors were encountered:
I think it's okay to make transactionNestingLevel protected (I don't see much sense in adding a setter for it – that would be effectively the same). As for making getParams() non-internal, it's a strict no.
I don't think we have a good API for customizing the behavior of the existing components, and I don't want to put the project in a position where we will be unable to make certain changes because they would break BC.
If you want to implement such an extension, you should use internal APIs and accept the risks that they may change over time. An alternative would be to decompose the wrapper connection into smaller pieces for which we could declare the interfaces that we can support.
Uh oh!
There was an error while loading. Please reload this page.
Feature Request
What
@internal
on methods inDoctrine\DBAL\Connection
that could be reused inwrapper_class
transactionNestingLevel
in a class that extendsDoctrine\DBAL\Connection
Why
I'm developping a custom
Doctrine\DBAL\Connection
(for handling my own custom transaction management) and used thewrapper_class
configuration parameter to setup my custom connection.To do so, I extended the original
Doctrine\DBAL\Connection
and saw that:@internal
annotation:a.
convertException
b.
getParams
transactionNestingLevel
property does not have theprotected
visibility and has no setter.How
@internal
annotation onconvertException
andgetParams
transactionNestingLevel
or change the property visibility toprotected
The text was updated successfully, but these errors were encountered: