Skip to content

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

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

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Nov 5, 2023

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

Currently pdo_pgsql has a bug where the username & password arguments have precedence over the DSN, even thought according to the docs it should be the other way. This was recently fixed on PHP's side, but it won't be available till 8.4.

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.

@HypeMC
Copy link
Contributor Author

HypeMC commented Nov 5, 2023

Don't know if I should ignore fabbot. Even though the default property values are useless on 5.4, they are required on 6.x because of the type hints.

fabpot added a commit that referenced this pull request Nov 5, 2023
This PR was merged into the 6.4 branch.

Discussion
----------

[Cache] Fix property types in PdoAdapter

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

I've noticed this while working on #52457, there's no reason these properties should be mixed as far as I can tell.

Commits
-------

f306b74 [Cache] Fix property types in PdoAdapter
@nicolas-grekas nicolas-grekas force-pushed the fix-pdo-postgres-default-username-and-password branch from 5c67a6e to 534c34c Compare November 6, 2023 17:37
@nicolas-grekas
Copy link
Member

Thank you @HypeMC.

@nicolas-grekas nicolas-grekas merged commit de8c5fc into symfony:5.4 Nov 6, 2023
@HypeMC HypeMC deleted the fix-pdo-postgres-default-username-and-password branch November 6, 2023 20:44
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.

3 participants