Skip to content

Commit

Permalink
updating testing procs
Browse files Browse the repository at this point in the history
  • Loading branch information
stovak committed Jan 28, 2025
1 parent e5f5fef commit 299a117
Showing 1 changed file with 0 additions and 105 deletions.
105 changes: 0 additions & 105 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ public function testFull(int $drupal_version = 10, string $site_name = NULL) {
$this->testAllowPlugins($site_name, $drupal_version);
$this->testPhpVersion($site_name, $drupal_version);

// If received Drupal 10, upgrade the recently created site to Drupal 10.
if ($drupal_version === 10) {
// @todo Make it downgrade to Drupal 9 when Drupal 10 becomes the default version.
$this->testUpgradeToDrupal10($site_name);
}

// Composer require the corresponding modules, push to Pantheon and install the site.
$this->testRequireSolr($site_name, $constraint);
Expand Down Expand Up @@ -345,106 +340,6 @@ public function testAllowPlugins(string $site_name, int $drupal_version) {
}
}

/**
* Upgrade given site to Drupal 10.
*
* @param string $site_name
* The machine name of the site to downgrade.
*/
public function testUpgradeToDrupal10(string $site_name) {
$site_folder = $this->getSiteFolder($site_name);
chdir($site_folder);

// Remove composer lock.
$this->taskExec('rm')
->args('composer.lock')
->run();

$this->taskExec('composer')
->args(
'config',
'minimum-stability',
'dev'
)
->run();

$this->taskExec('composer')
->args(
'config',
'platform.php',
'8.1'
)
->run();

$this->taskExec('composer')
->args(
'require',
'--no-update',
'drupal/core-recommended:^10',
'drupal/core-project-message:^10',
'drupal/core-composer-scaffold:^10',
'pantheon-systems/drupal-integrations:^10',
'mglaman/composer-drupal-lenient'
)
->run();

$this->taskExec('composer')
->args(
'require',
'--no-update',
'--dev',
'drupal/core-dev:^10'
)
->run();

$this->taskExec('composer')
->args('update')
->run();

$this->taskExec('composer')
->args(
'config',
'--merge',
'--json',
'extra.drupal-lenient.allowed-list',
'["drupal/search_api_pantheon"]'
)
->run();
return ResultData::EXITCODE_OK;
}

/**
* Downgrade given site to Drupal 8.
*
* @param string $site_name
* The machine name of the site to downgrade.
*/
public function testDowngradeToDrupal8(string $site_name) {
$site_folder = $this->getSiteFolder($site_name);
chdir($site_folder);

// Remove composer lock.
$this->taskExec('rm')
->args('composer.lock')
->run();


$this->taskExec('composer')
->args(
'require',
'--no-update',
'-W',
'drupal/core-recommended:^8',
'pantheon-systems/drupal-integrations:^8'
)
->run();

$this->taskExec('composer')
->args('update')
->run();
return ResultData::EXITCODE_OK;
}

/**
* Composer require the Solr related modules.
*
Expand Down

0 comments on commit 299a117

Please sign in to comment.