Skip to content

Move get_php_binary() to Utils to DRY code.#4483

Merged
danielbachhuber merged 1 commit intomasterfrom
dry_get_php_binary
Nov 3, 2017
Merged

Move get_php_binary() to Utils to DRY code.#4483
danielbachhuber merged 1 commit intomasterfrom
dry_get_php_binary

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Nov 3, 2017

Related #4481

Moves body of WP_CLI::get_php_binary() to Utils\get_php_binary() and removes version in FeatureContext to DRY up code, leaving stub WP_CLI::get_php_binary() for BC. Also changes it to return full Windows path (ie includes .exe extension) for PHP 5.3 for easier testing.

Also exports WP_CLI_PHP_USED and WP_CLI_PHP in Feature::get_process_env_variables() as could be useful for testing different PHP versions locally.

@gitlost gitlost added the scope:testing Related to testing label Nov 3, 2017
@gitlost gitlost added this to the 1.5.0 milestone Nov 3, 2017
@gitlost gitlost requested a review from a team November 3, 2017 11:59
* Environment values permit specific binaries to be indicated.
*
* @access public
* @category System
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Thanks for this.

@danielbachhuber danielbachhuber merged commit ff408f3 into master Nov 3, 2017
@danielbachhuber danielbachhuber deleted the dry_get_php_binary branch November 3, 2017 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants