Skip to content
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

[5] add host database port #43926

Closed
wants to merge 6 commits into from
Closed

[5] add host database port #43926

wants to merge 6 commits into from

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Aug 15, 2024

Draft partial Pull Request for Feature request #43902 .

Summary of Changes

add db host port filed

Testing Instructions

ìnstall and play with different setup db hostname and db port

Actual result BEFORE applying this Pull Request

postgres pdo doesn't work if port different from default (5432)

Expected result AFTER applying this Pull Request

you can set a db port

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@muhme
Copy link
Contributor

muhme commented Aug 16, 2024

Thank you @alikon for this draft PR, I added a language overwrite and did a picture:

shoot

There are arguments for (e.g. using 2001:db8::1 and 1066) and against an additional field for the port number (e.g. using [2001:db8::1]:1066). I vote for a new field because two reasons:

  1. The documentation. We have to give help on screen and to describe it in detail and this is easier with separate field and not using additional square brackets for IPv6 addresses
  2. Security checks with two separate fields for host and port number are easier to implement and maintain as with single field

Why do we need backwards compatibility here? And there is no hurry, from my point of view we can have it 5.2.

Another point: I would make the field optional and blank by default if the default database port is used. This again for simplicity: If we display the default port number, then we have to change it when the database is changed.

@alikon alikon changed the base branch from 5.1-dev to 5.2-dev August 16, 2024 07:08
@alikon alikon changed the base branch from 5.2-dev to 5.1-dev August 16, 2024 07:08
@degobbis
Copy link
Contributor

I like the idea behind this PR, but I don't think it makes sense to make the field required.
If the field is empty, the default port should be used automatically.
In addition, it would certainly make sense to check the previous entry in “Host” to see whether a port was already specified there and, if necessary, to move it to the new field and to change the configuration.php.

@alikon
Copy link
Contributor Author

alikon commented Sep 1, 2024

with joomla-framework/database#310 no more needed

in cypress.config.mjs db_host: 'localhost:5433'

@alikon alikon closed this Sep 1, 2024
@alikon alikon deleted the 5.1-dev branch September 1, 2024 08:00
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.

6 participants