Skip to content

[Messenger] fix compatibility with Doctrine DBAL 4 #52476

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 7, 2023

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Nov 6, 2023

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

@xabbuh
Copy link
Member Author

xabbuh commented Nov 6, 2023

see doctrine/dbal#6191

@derrabus
Copy link
Member

derrabus commented Nov 7, 2023

The idea behind that feature was that Symfony could leverage the query builder for building the "skip locked rows" query.

@xabbuh xabbuh force-pushed the doctrine-dbal-6191 branch 4 times, most recently from 97aacef to 2f059e0 Compare November 7, 2023 07:55
@xabbuh
Copy link
Member Author

xabbuh commented Nov 7, 2023

Thanks for your feedback. I guess it's better now.

@xabbuh xabbuh force-pushed the doctrine-dbal-6191 branch from 2f059e0 to 55b000e Compare November 7, 2023 09:40
if (preg_match('/FROM (.+) WHERE/', (string) $sql, $matches)) {

if (method_exists(QueryBuilder::class, 'forUpdate')) {
$query->forUpdate();
Copy link
Member

Choose a reason for hiding this comment

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

For the case of the oracle platform, this is now applying the lock on the inner query and not the outer one (see the specific code below). Is this expected ?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's probably better not to change the outcome here, updated

@xabbuh xabbuh force-pushed the doctrine-dbal-6191 branch from 55b000e to fca96ac Compare November 7, 2023 09:59
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit a454d0c into symfony:5.4 Nov 7, 2023
@xabbuh xabbuh deleted the doctrine-dbal-6191 branch November 7, 2023 10:21
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