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

Bug fix for Issue #5109 #5115

Merged
merged 3 commits into from Mar 25, 2019

Conversation

@jbwtech
Copy link
Contributor

commented Mar 25, 2019

Added support for DB_HOST strings that include 'p:' for persistent DB connections. If present, the 'p:' modifier is replaced with '' to allow the correct parsing of the remaining host string.

Update utils.php
Added support for DB_HOST strings that include 'p:' for persistent DB connections. If present, the 'p:' modifier is replaced with '' to allow the correct parsing of the remaining host string.

@jbwtech jbwtech requested a review from wp-cli/committers as a code owner Mar 25, 2019

@jbwtech

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2019

Addresses issue #5109

@danielbachhuber
Copy link
Member

left a comment

Thanks for the pull request, @jbwtech.

Could you include a test case for this in UtilsTest too?

class UtilsTest extends PHPUnit_Framework_TestCase {

jbwtech added some commits Mar 25, 2019

Added testing of Utils\mysql_host_to_cli_args()
DB_HOST string parsing check for strings with and without the 'p:' modifier.  Added for issue #5109
Correction for return value matching
Correct errors in expected array to match return value;  Utils\mysql_host_to_cli_args() returns an associative array.

@jbwtech jbwtech changed the title Update utils.php Bug fix for Issue #5109 Mar 25, 2019

@@ -332,7 +332,7 @@ public function testAssocArgsToString() {
public function testMysqlHostToCLIArgs() {
// Test hostname only, with and without 'p:' modifier
$expected = array(
'hostname'
'host' => 'hostname'

This comment has been minimized.

Copy link
@jbwtech

jbwtech Mar 25, 2019

Author Contributor

Issue #5109

@danielbachhuber
Copy link
Member

left a comment

Great work!

@danielbachhuber danielbachhuber added this to the 2.2.0 milestone Mar 25, 2019

@danielbachhuber danielbachhuber merged commit 3a2c231 into wp-cli:master Mar 25, 2019

2 checks passed

DEP All dependencies are resolved
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.