Skip to content

Introduce WP_CLI::runcommand(), the best way to run WP-CLI commands#3605

Merged
danielbachhuber merged 20 commits into
masterfrom
3139-runcommand
Nov 27, 2016
Merged

Introduce WP_CLI::runcommand(), the best way to run WP-CLI commands#3605
danielbachhuber merged 20 commits into
masterfrom
3139-runcommand

Conversation

@danielbachhuber
Copy link
Copy Markdown
Member

@danielbachhuber danielbachhuber commented Nov 24, 2016

  • Launch a new process, rendering output.
  • Launch a new process, capturing output.
  • Reuse existing process, rendering output.
  • Reuse existing process, capturing output.
  • Ensure environment variables and WP-CLI config are passed through when launching new process.
  • Prevent halting script execution when reusing existing process.
  • Return command execution as full object, or specific return values.
  • Abstract command parsing to Utils\parse_str_to_argv() with tests.
  • Use parse=json to parse JSON output.
  • Use WP_CLI::runcommand() where ::launch_self() is currently used.
  • PHPDoc with examples.

Fixes #3139

@danielbachhuber danielbachhuber merged commit b2dfe03 into master Nov 27, 2016
@danielbachhuber danielbachhuber deleted the 3139-runcommand branch November 27, 2016 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant