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 }} diff --git a/src/Commands/StructuredListTrait.php b/src/Commands/StructuredListTrait.php index 5d5d1d239..c613a9f42 100644 --- a/src/Commands/StructuredListTrait.php +++ b/src/Commands/StructuredListTrait.php @@ -93,6 +93,9 @@ private function addDatetimeRenderer(AbstractStructuredList $list, array $date_a $list->addRendererFunction( function ($key, $cell_data) use ($config, $date_attributes) { if (!is_numeric($key) && in_array($key, $date_attributes)) { + if (empty($cell_data)) { + return '-'; + } return $config->formatDatetime($cell_data); } return $cell_data; 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',