Skip to content

Commit

Permalink
Merge branch '3.x' of github.com:pantheon-systems/terminus into php8.…
Browse files Browse the repository at this point in the history
…3-support
  • Loading branch information
kporras07 committed Sep 14, 2023
2 parents 82a9e78 + be0691c commit fbd535f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/3x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 9 additions & 4 deletions src/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions src/Terminus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit fbd535f

Please sign in to comment.