Skip to content

fix(PgSQL): Allow to pass IPv6 address in URI notation for postgres #6344

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
Jun 15, 2025

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Mar 21, 2024

Q A
Type improvement
Fixed issues

Summary

Allow to pass IPv6 address of postgres server in URI notation ([ff:aa:...]).
When the host is passed in URI format to host parameter of pg_connect it will fail because it then tries to resolve it as when it was a real host name.
Instead just pass the IP address to the hostaddr parameter.

@derrabus
Copy link
Member

derrabus commented Mar 21, 2024

Thank you for your PR.

Please note that we don't merge code changes that are not covered by tests. Is the 3.8.x branch also affected by this bug? If so, please target the 3.8.x branch.

@susnux susnux changed the base branch from 4.0.x to 3.8.x March 21, 2024 21:41
@susnux susnux force-pushed the fix/postgres-ipv6-connection branch 2 times, most recently from 9159548 to 2f9e58c Compare March 21, 2024 23:02
@susnux
Copy link
Contributor Author

susnux commented Mar 21, 2024

Please not that we don't merge code changes that are not covered by tests.

I have added a test now.

Is the 3.8.x branch also affected by this bug? If so, please target the 3.8.x branch.

Yes, changed the target.

@susnux susnux force-pushed the fix/postgres-ipv6-connection branch from 2f9e58c to b96a51d Compare March 21, 2024 23:35
@derrabus
Copy link
Member

The Psalm failure is related to your changes.

@susnux susnux force-pushed the fix/postgres-ipv6-connection branch from b96a51d to 2360331 Compare March 22, 2024 12:40
@susnux
Copy link
Contributor Author

susnux commented Mar 22, 2024

The Psalm failure is related to your changes.

Should be fixed now

Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Jun 21, 2024
@susnux
Copy link
Contributor Author

susnux commented Jun 21, 2024

@derrabus anything I can help with?

@derrabus
Copy link
Member

Sorry for the delay. I forgot about this one. 😓

@github-actions github-actions bot removed the Stale label Jun 22, 2024
@derrabus derrabus changed the base branch from 3.8.x to 3.9.x August 14, 2024 10:59
@susnux susnux force-pushed the fix/postgres-ipv6-connection branch 2 times, most recently from b2e180b to a81d076 Compare October 20, 2024 13:03
Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Jan 19, 2025
Copy link

This pull request was closed due to inactivity.

@github-actions github-actions bot closed this Jan 27, 2025
@derrabus derrabus reopened this Jan 28, 2025
@derrabus derrabus added this to the 3.9.5 milestone Jan 28, 2025
@github-actions github-actions bot removed the Stale label Jan 29, 2025
Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Apr 29, 2025
Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

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

PHPCS and PHPStan need some attention. I can look into this.

@susnux susnux force-pushed the fix/postgres-ipv6-connection branch from a81d076 to 69eee11 Compare April 29, 2025 06:47
@susnux
Copy link
Contributor Author

susnux commented Apr 29, 2025

PHPCS and PHPStan need some attention. I can look into this.

Also noticed it and fixed the reported issues, thank you!

@susnux susnux force-pushed the fix/postgres-ipv6-connection branch from 670dbd0 to c5bc9b2 Compare April 29, 2025 06:49
@susnux susnux requested a review from derrabus April 29, 2025 06:49
@github-actions github-actions bot removed the Stale label Apr 30, 2025
Co-authored-by: Ferdinand Thiessen <[email protected]>
Co-authored-by: Alexander M. Turek <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@derrabus derrabus force-pushed the fix/postgres-ipv6-connection branch from c5bc9b2 to ded6a5c Compare June 15, 2025 22:31
@derrabus derrabus merged commit 72f7bf2 into doctrine:3.9.x Jun 15, 2025
55 of 56 checks passed
derrabus added a commit to derrabus/dbal that referenced this pull request Jun 15, 2025
* 3.9.x:
  Bump dev tools (doctrine#7002)
  fix(PgSQL): Allow to pass IPv6 address in URI notation for postgres (doctrine#6344)
  Run tests on MySQL 9.3 instead of 9.1 (doctrine#7001)
  CI MariaDB: add 11.8 (doctrine#6991)
derrabus added a commit that referenced this pull request Jun 15, 2025
* 3.9.x:
  Bump dev tools (#7002)
  fix(PgSQL): Allow to pass IPv6 address in URI notation for postgres (#6344)
  Run tests on MySQL 9.3 instead of 9.1 (#7001)
  CI MariaDB: add 11.8 (#6991)
derrabus added a commit to derrabus/dbal that referenced this pull request Jun 15, 2025
* 4.2.x:
  Ignore new PHPStan errors
  Bump dev tools (doctrine#7002)
  fix(PgSQL): Allow to pass IPv6 address in URI notation for postgres (doctrine#6344)
  Run tests on MySQL 9.3 instead of 9.1 (doctrine#7001)
  CI MariaDB: add 11.8 (doctrine#6991)
derrabus added a commit to derrabus/dbal that referenced this pull request Jun 17, 2025
* 4.3.x:
  phpunit/phpunit (11.5.15 => 11.5.23) (doctrine#7006)
  Deprecate support for MariaDB 10.5 (doctrine#7000)
  Fix new and previously ignored PHPStan errors
  Ignore new PHPStan errors
  Bump dev tools (doctrine#7002)
  fix(PgSQL): Allow to pass IPv6 address in URI notation for postgres (doctrine#6344)
  Run tests on MySQL 9.3 instead of 9.1 (doctrine#7001)
  CI MariaDB: add 11.8 (doctrine#6991)
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