Skip to content

Merge 3.9.x up into 3.10.x #6947

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 4 commits into from
May 12, 2025
Merged

Merge 3.9.x up into 3.10.x #6947

merged 4 commits into from
May 12, 2025

Conversation

morozov
Copy link
Member

@morozov morozov commented May 12, 2025

No description provided.

ashutoshagrawal1010 and others added 4 commits April 30, 2025 09:44
…trine#6936)

|      Q       |   A
|------------- | -----------
| Type         | bug
| Fixed issues | doctrine#6780

#### Summary
This PR fixes incorrect boolean parameter binding behavior when using
the native `pgsql` driver in Doctrine DBAL.

Previously, when binding a boolean `false` value using the native pgsql
driver, Doctrine incorrectly serialized the value as an empty string
(`''`). PostgreSQL does not accept empty strings for boolean fields,
resulting in the following error:
```
invalid input syntax for type boolean: "
```
This PR involves below changes:

- Normalize boolean values to `'t'` (true) or `'f'` (false) in
`Driver\PgSQL\Statement`.
- Adjust parameter types to `ParameterType::STRING` when binding
booleans for pgsql to reflect the transformed type.
- Add functional tests to validate boolean `true` and `false` insertion
behavior for all databases.
@morozov morozov merged commit 53e333d into doctrine:3.10.x May 12, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants