Skip to content

Add Utils\proc_open_compat() for Windows compat, plus misc other compat. - #4572

Merged
danielbachhuber merged 1 commit into
masterfrom
windows_phpunit
Dec 13, 2017
Merged

Add Utils\proc_open_compat() for Windows compat, plus misc other compat.#4572
danielbachhuber merged 1 commit into
masterfrom
windows_phpunit

Conversation

@gitlost

@gitlost gitlost commented Dec 13, 2017

Copy link
Copy Markdown
Contributor

Fixes #4566

Adds Utils\proc_open_compat() (and companion private Utils\_proc_open_compat_win_env()) function for Windows compatible proc_open(), and uses it instead of proc_open() throughout (there's another instance in server-command). Also escapes all instances ofget_php_binary().

Changes DocParser\get_arg_or_param_args() to use "\n" instead of PHP_EOL as it's been subbed already.

Also simplifies Utils\get_temp_dir() to just use sys_get_temp_dir() as it always returns some non-empty value.

Makes various Windows-compat changes to the phpunit tests, in particular not using WP_CLI_PHP_ARGS and bin/wp but calling php\boot-fs.php directly as bin/wp.bat doesn't have WP_CLI_PHP_ARGS and the invocation was *nix-specific anyway.

Also makes FeatureContext\get_process_env_variables() more Windows-compat by setting the path separator for the PATH appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment