-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add database port to Magento Setup Model Installer #2735
Add database port to Magento Setup Model Installer #2735
Conversation
Hi @tkn98 , thanks for the contribution. But you can specify port as part of the |
@buskamuza: Thanks for the insights you present about the command-line switch. In my scenario, I was referring to So this report / PR is probably a good point to pin-point the exact cause. First of all, I can confirm that it's possible to use the port number within the But if the With this new information, would you argue with the information given from your comment, that the port setting in /Edit: PHP PDO DSN named elements documentation is here: http://php.net/manual/en/ref.pdo-mysql.connection.php |
Hi @tkn98 , could you please clarify what do you mean under "blacklisting"? General idea in Magento is that port is expected in the "host" configuration. See https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php#L327 |
Hi @buskamuza, sure, I'll try to make more clear what I mean by blacklisting and my explanation should also show why in my scenario it doesn't work. The
What is named
That means that the config setting You argue that the code that containing the A concrete example of blacklisting the port entry then would be to unset the port element first before occasionally setting it (first line ist added to your example):
This little change would effectively prevent that the env.php configuration has different interpretations on the port setting when used in store or in setup. This change is what I meant by saying "blacklisting" as removing the I hope this gives a better example and also outlines better the data-flow that I experienced in my scenario which led to the different interpretation of the configuration values. |
For reference the beginning of the
|
@tkn98 , thanks for the explanation. |
Hi once again, @tkn98 . Also, if you would agree to prepare a new PR with such behavior, we'll be happy to accept it and it should be faster than processing it internally. |
@buskamuza: Hi Olga, I'm very much for blocking the " About the exception: Apart from taste, the existing code in Zend_DB does not throw exceptions on named configuration fields it drops, it just unsets them without notice (ref.). Just saying, that place in code is not entirely comparable (but related) with the port issue we discuss here. I'm personally fine with throwing exceptions, so that the configuration issue won't get unnoticed then for a user who didn't see the issue so far but has it "configured". If the message gives a good hint where to configure the port, everybody should be happy. |
@buskamuza: If the "port" entry is forbidden then #2736 is obsolete as it is not missing any longer (as it is part of the "host" entry and it can't be used at all any longer). |
Thanks, @tkn98 |
@buskamuza: No problem, just ping me if you need anything else from my end. And thank you for your helpful and constructive assistance with the issue. |
@buskamuza (from a private account here) please let me know if you'd like to have a pull request for this. I can do one. Currently I'm progressing the CLA within the company. Happy new year btw.. |
@ktomk , sure, a pull request would be a great help. |
Hello @tkn98, please merge latest changes from develop and rerun builds. |
@vancoz: As decided this needs a different patch, too. I'll replace it at times ETA sometime on Thursday. |
Thank you @ktomk! |
throw exception when port is set within a parameter of it's own. the (optional) database port is to be set within the host parameter and not within the port parameter.
6fa2c4b
to
b4e0901
Compare
@vancoz: Please find this PR updated with the patch. |
@vancoz: Please trigger the build again, it should have been green but one of the machines went down. |
@tkn98 I've restarted the failed job in the build. |
Hello @tkn98, this PR has been merged in the 2.1.0 Release, that's why I'm closing it. If you any questions or additional information regarding the PR feel free to reopen it or create a new one. |
Looks like this was not merged. |
Hey @KrystynaKabannyk, can we please share the hash of the commit where this has been fixed? |
[MAGETWO-92693] Some improvements on product create|edit page in admin area
Take optional database port setting into account when connecting to the database with the Magento Setup Model.
Previously it was not possible to use magento setup with a non-standard database port.