diff --git a/.github/workflows/3x.yml b/.github/workflows/3x.yml index 16b805f69..d64f8d048 100644 --- a/.github/workflows/3x.yml +++ b/.github/workflows/3x.yml @@ -58,6 +58,8 @@ jobs: env: TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }} TERMINUS_SITE: ${{ secrets.TERMINUS_SITE }} + TERMINUS_SITE_WP: ${{ secrets.TERMINUS_SITE_WP }} + TERMINUS_SITE_WP_NETWORK: ${{ secrets.TERMINUS_SITE_WP_NETWORK }} TERMINUS_ORG: ${{ secrets.TERMINUS_ORG }} TERMINUS_BASE_DIR: ${{ secrets.TERMINUS_BASE_DIR }} TERMINUS_PLUGINS_DIR: ${{ secrets.TERMINUS_PLUGINS_DIR }} diff --git a/src/Models/Environment.php b/src/Models/Environment.php index 055d50a13..49c962030 100755 --- a/src/Models/Environment.php +++ b/src/Models/Environment.php @@ -168,10 +168,15 @@ public function cloneDatabase(Environment $from_env, array $options = []) if (isset($options['updatedb'])) { $options['updatedb'] = (int)$options['updatedb']; } - $params = array_merge( - ['from_environment' => $from_env->getName(),], - $options - ); + $params = [ + 'from_environment' => $from_env->getName(), + 'updatedb' => $options['updatedb'] ?? 0, + 'clear_cache' => $options['clear_cache'] ?? false, + ]; + if (!empty($options['from_url']) && !empty($options['to_url'])) { + $params['wp_replace_siteurl']['from_url'] = $options['from_url']; + $params['wp_replace_siteurl']['to_url'] = $options['to_url']; + } return $this->getWorkflows()->create( 'clone_database', compact('params') diff --git a/src/Terminus.php b/src/Terminus.php index 419253738..a7895a393 100644 --- a/src/Terminus.php +++ b/src/Terminus.php @@ -296,6 +296,7 @@ private function addBuiltInCommandsAndHooks() { // List of all hooks and commands. Update via 'composer update-class-lists' $this->commands = [ + 'Consolidation\\Filter\\Hooks\\FilterHooks', 'Pantheon\\Terminus\\Hooks\\Authorizer', 'Pantheon\\Terminus\\Hooks\\RoleValidator', 'Pantheon\\Terminus\\Hooks\\SiteEnvLookup',