-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
[3.x] Remove square brackets from ipv6 host on PostgreSQL, refactor changes from PR 310 and move options modifications to constructor #317
base: 3.x-dev
Are you sure you want to change the base?
Conversation
Move adjustment of connection-specific options like e.g. host, port and socket from connect method to constructor and refactor the extractHostPortSocket for that purpose and add handling of ipv6 squared brackets
Running System Tests with current
Running the 36 Joomla installations it's a bit like baking rolls 😄 |
@muhme It seems the link test2.sh.txt opens the download for a GitHub attachment which is empty, so I don't really know what your test script does in detail. Do your tests cover the case that the port is not given as a separate driver option but encoded in the host name, like e.g. |
@richard67 the link still works for me, however here is the source
And yes, the 6. test covers IPv4 with non-default port e.g. |
I see. You have tested all cases. Thanks a lot. |
Pull Request for CMS Issue joomla/joomla-cms#43902
Alternative to #315 and #316 .
Summary of Changes
This pull request (PR) moves the adjustment of connection-specific options like e.g. host, port and socket from the connect method of the PDO and MySQLi database drivers to the constructor.
The
setHostPortSocket
method which was added to the base driver with PR #310 is changed to use function parameters and return the modified parameters in an array, and that method is renamed toextractHostPortSocket
to reflect that change.A new boolean parameter is added to that method to control if the square brackets around an IP v6 address in the
host
parameter should be kept ("MySQLi" and "MySQL (PDO)") or if they should be removed ("PostgreSQL (PDO)") in the connection parameters. The default is true to keep the square brackets. For "PosgreSQL (PDO)" it is set to false so the quare brackets are removed. This makes it possible to specify an IP v6 address together with a port number for "PostgreSQL (PDO)" in the same way as it already works for "MySQLi" and "MySQL (PDO)".Testing Instructions
See CMS issue joomla/joomla-cms#43902 and joomla-projects/joomla-cypress#36 .
Documentation Changes Required
Don't know.