Skip to content

Fix GH-12423: [pdo_pgsql] Changed to prioritize DSN authentication information over arguments. #12424

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

Closed
wants to merge 1 commit into from

Conversation

SakiTakamachi
Copy link
Member

fixes #12423

I was a little worried about which branch to target, but decided to target master because the behavior would change.

@devnexen
Copy link
Member

would it be possible to add a test ?

@SakiTakamachi
Copy link
Member Author

Okay, I'll add it later.

@SakiTakamachi
Copy link
Member Author

@devnexen

I added a test.

@jorgsowa
Copy link
Contributor

Probably it requires a note in UPGRADING as this may change the code behavior for some users.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

Nice one. We can always create a UPGRADING entry at commit time. I ll let it sit for awhile to see what other people think of it.

@devnexen
Copy link
Member

devnexen commented Oct 15, 2023

While at it, would you mind squashing into 1 commit when you can ? If no one object I ll either commit today or tomorrow. Cheers.

@SakiTakamachi
Copy link
Member Author

@devnexen
I've compiled the commits!

@devnexen devnexen closed this in b5c287e Oct 15, 2023
@devnexen
Copy link
Member

Thank you !

@SakiTakamachi
Copy link
Member Author

Thank you!

nicolas-grekas added a commit to symfony/symfony that referenced this pull request Nov 6, 2023
…for PDO PostgreSQL (HypeMC)

This PR was merged into the 5.4 branch.

Discussion
----------

[Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL

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

Currently [pdo_pgsql has a bug](php/php-src#12423) where the username & password arguments have precedence over the DSN, even thought [according to the docs](https://www.php.net/manual/en/ref.pdo-pgsql.connection.php) it should be the other way. This was recently fixed on PHP's side, but it [won't be available till 8.4](php/php-src#12424).

Since the bug is not present when the values passed are `null`, which are the default argument values anyway, this PR changes the default values of the properties to match.

Commits
-------

534c34c [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL
symfony-splitter pushed a commit to symfony/cache that referenced this pull request Nov 6, 2023
…for PDO PostgreSQL (HypeMC)

This PR was merged into the 5.4 branch.

Discussion
----------

[Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL

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

Currently [pdo_pgsql has a bug](php/php-src#12423) where the username & password arguments have precedence over the DSN, even thought [according to the docs](https://www.php.net/manual/en/ref.pdo-pgsql.connection.php) it should be the other way. This was recently fixed on PHP's side, but it [won't be available till 8.4](php/php-src#12424).

Since the bug is not present when the values passed are `null`, which are the default argument values anyway, this PR changes the default values of the properties to match.

Commits
-------

534c34cb79 [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL
@SakiTakamachi SakiTakamachi deleted the fix/gh-12423 branch November 21, 2023 07:19
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.

pdo_pgsql constructor behavior differs from documentation
3 participants