Skip to content
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

[Cache][Lock] Identify missing table in pgsql correctly and address failing integration tests #54305

Merged
merged 1 commit into from Mar 16, 2024

Conversation

arifszn
Copy link
Contributor

@arifszn arifszn commented Mar 15, 2024

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

Description

The existing code snippet is as follows:

$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();

switch (true) {
    case 'pgsql' === $driver && '42P01' === $code:

When we print $exception->errorInfo[1], it yields 7, which is interpreted as false. This behavior has been rectified.

Additionally, this pull request fixes the integration tests that have been failing persistently until now.

image

@nicolas-grekas
Copy link
Member

I'd really prefer to have a logic that's as close as possible as what dbal does. Can you please have a look with this in mind?

@carsonbot carsonbot changed the title Identify missing table in pgsql correctly and address failing integration tests [Cache][Lock] Identify missing table in pgsql correctly and address failing integration tests Mar 15, 2024
@arifszn
Copy link
Contributor Author

arifszn commented Mar 15, 2024

I'd really prefer to have a logic that's as close as possible as what dbal does. Can you please have a look with this in mind?

@nicolas-grekas, please check now.

@arifszn arifszn force-pushed the fix-integration-tests branch 2 times, most recently from 1120396 to 7e29867 Compare March 15, 2024 22:53
@nicolas-grekas
Copy link
Member

Thank you @arifszn.

@nicolas-grekas nicolas-grekas merged commit 07a6ffe into symfony:5.4 Mar 16, 2024
9 of 12 checks passed
This was referenced Apr 2, 2024
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.

None yet

4 participants