From 1811fbb1441ff5dc37f67318b940ce29e093aa4e Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Wed, 6 Sep 2023 21:03:37 -0600 Subject: [PATCH 1/3] Add missing filterhooks. --- src/Terminus.php | 1 + 1 file changed, 1 insertion(+) 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', From 25778ed29005b4e8b320b5d6c0b66924c258340f Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Wed, 6 Sep 2023 21:07:42 -0600 Subject: [PATCH 2/3] Add missing vars for tests. --- .github/workflows/3x.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/3x.yml b/.github/workflows/3x.yml index ce2d49c6f..6fc19403e 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 }} From ef2b6919d467cff9b4f40f6f403cfa87d2bba507 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Tue, 12 Sep 2023 11:47:29 -0600 Subject: [PATCH 3/3] Fix clone database workflow creation. --- src/Models/Environment.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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')