wp-cli/wp-cli — pull request #685 by scribu (2013-08-16 18:35:54+00:00)
Title: Refactor code that makes mysql and mysql dump calls

#562 added logic for supporting custom ports for `mysql` calls.
#684 added logic for supporting custom ports for `mysqldump` calls.

The logic is the same in both cases: convert `DB_*` constants to CLI parameters.

We can avoid that duplication. Also:

* [ ] pass associative arrays, instead of strings
* [ ] use $env paramter of `proc_open()`, instead of putenv()