-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Lock] Split PdoStore into DoctrineDbalStore #43332
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
Conversation
|
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
7e5c686 to
70d9543
Compare
70d9543 to
54d687b
Compare
|
I think, we can simplify
This should allow us to remove all DBAL-related code from |
|
Oh, and thank you very much for working on this topic! |
39bcf0c to
7922f8b
Compare
7922f8b to
e1b3c34
Compare
6a80a44 to
f7d493a
Compare
src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php
Outdated
Show resolved
Hide resolved
952ca0e to
af32763
Compare
af32763 to
53f84af
Compare
|
Can you take a look at the failing tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you!
|
Thank you @GromNaN. |
14d99b6 to
6dcaae1
Compare
This is actually a regression. |
…able + add tests (HypeMC) This PR was merged into the 5.4 branch. Discussion ---------- [Cache][HttpFoundation][Lock] Fix PDO store not creating table + add tests | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Unlike e.g. SQLite, PostgreSQL doesn't throw an exception on `$conn->prepare()` if the table is missing, it instead throws it on `$stmt->execute()`, so the table never gets created. The table used to get created, but the behavior was broken with #43332. Commits ------- cb5d832 [Cache][Lock] Fix PDO store not creating table + add tests
Main changes:
DoctrineDbalStoreandDoctrineDbalPostgreSqlStore.Doctrine\DBAL\Connectionor<driver>://DSN inPdoStoreorPostgreSqlStoreis deprecated in 5.4 and will be removed in 6.0. UseDoctrineDbalStoreorDoctrineDbalPostgreSqlStoreinstead.DoctrineDbalStore(thanks to numerical params)DoctrineDbalStoreorDoctrineDbalPostgreSqlStoreis instanced, instead of the first usage of the connection.