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

Appearance settings

[Lock] create lock table if it does not exist #44370

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

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

martinssipenko
Copy link
Contributor

@martinssipenko martinssipenko commented Nov 30, 2021

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #44369
License MIT
Doc PR N/A

Fix bug where tables are not automatically created when using Symfony\Component\Lock\Store\DoctrineDbalStore.

@derrabus
Copy link
Member

Can you please add a test?

@martinssipenko
Copy link
Contributor Author

@derrabus I'd be happy to, but given this is my first contribution to Symfony and none of the other sites have tests for this case I would need some guidance.

@martinssipenko
Copy link
Contributor Author

@derrabus check the last commit, perhaps that would work? If remove the createTable() invocation from DoctrineDbalStore and/or PdoStore the tests will fail now.

@derrabus
Copy link
Member

Thank you @martinssipenko for taking care of this regression.

@derrabus derrabus merged commit 4a07e06 into symfony:5.4 Nov 30, 2021
Copy link
Member

@jderusse jderusse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PdoStore there is an extra check that assert there is no active transaction.
Shouldn't we do the same here ?

@GromNaN
Copy link
Member

GromNaN commented Nov 30, 2021

Exact, there was the same check for DBAL in 5.3. https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Lock/Store/PdoStore.php#L143

It is wise to add it back.

@jderusse
Copy link
Member

jderusse commented Nov 30, 2021

could you open a PR to handle it @martinssipenko?

@martinssipenko martinssipenko deleted the gh-44369 branch December 1, 2021 05:27
@martinssipenko
Copy link
Contributor Author

@jderusse @GromNaN I've created a pull request to do this #44383

This was referenced Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.