-
-
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
Create Connection from existing PDO instance #5250
Comments
Not meant as a critic, but as a hint to other readers: I was looking at the 3.3.0 changelog in order to find where we did that BC-break and then I noticed that you're reporting a BC-break:
I think it really is a good thing that we merged #5247 because it will make people more likely to pick "support question" for that kind of case. Also for other readers: here is the PR where we deprecated doing this: #3554 That PR mentions another fix:
Does this help? |
@greg0ire thanks for some supporting documentation on this. There wasn't much out there about this topic, so I created a ticket. It wasn't clear that this was an intentional deprecation and not a BC break. I'm not happy about it and disagree with how it's done, but I digress. Closing this, hopefully it's helpful to others with the same issue. |
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. |
BC Break Report
Prior to version 3, you could set the
pdo
property of theDoctrine\DBAL\Connection
params. This allowed for you to reuse a PDO connection object.Summary
The issue here is that you no longer have a way to reuse a connection with Doctrine. I guess the idea now is that you should initialize your PDO connection with Doctrine, then use the new
getNativeConnection
method.Please reference this ticket as well: #4603.
Even if you overload the
_conn
property via reflection, you're still left with the error mentioned in this ticket.The
Doctrine\DBAL\Driver\PDO\Statement
class doesn't extendPDOStatement
.The text was updated successfully, but these errors were encountered: