Skip to content

Commit

Permalink
Drupal 10 Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Oct 12, 2023
1 parent 99a350d commit 84d75bd
Show file tree
Hide file tree
Showing 21 changed files with 3,493 additions and 7,563 deletions.
3 changes: 1 addition & 2 deletions blt/blt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project:
name: stanford_profile
local: { }
git:
default_branch: 1.x
default_branch: 4.x
remotes:
- '[email protected]:stanfordgryphon.git'
deploy:
Expand All @@ -23,7 +23,6 @@ modules:
dev: {}
test: {}
prod: {}
simplesamlphp: true
cm:
strategy: config-split
allow-overrides: true
Expand Down
50 changes: 1 addition & 49 deletions blt/src/Blt/Plugin/Commands/GryphonHooksCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,11 @@ public function postMultiSiteInit() {

$this->say(sprintf('Remember to create the cron task. Run <info>gryphon:create-cron</info> to create the new cron job.'));
$create_db = $this->ask('Would you like to create the database on Acquia now? (y/n)');
if (substr(strtolower($create_db), 0, 1) == 'y') {
if (str_starts_with(strtolower($create_db), 'y')) {
$this->invokeCommand('gryphon:create-database');
}
}

/**
* Deletes any local related file from artifact after BLT copies them over.
*
* @hook post-command artifact:build:simplesamlphp-config
*/
public function postArtifactSamlConfigCopy() {
$deploy_dir = $this->getConfigValue('deploy.dir');
$files = glob("$deploy_dir/vendor/simplesamlphp/simplesamlphp/config/*local.*");
$task = $this->taskFileSystemStack();
foreach ($files as $file) {
$task->remove($file);
}
$task->run();
}

/**
* Copy the default global settings for local settings.
*
Expand Down Expand Up @@ -105,37 +90,4 @@ public function preDbScrub(CommandData $comand_data) {
$this->switchSiteContext($site);
}

/**
* Set nobots to emit headers for non-production sites.
*
* @hook post-command artifact:ac-hooks:post-db-copy
*/
public function postDbCopy($result, CommandData $comand_data) {
if (!EnvironmentDetector::isProdEnv()) {
// Disable alias since we are targeting specific uri.
$this->config->set('drush.alias', '');

foreach ($this->getConfigValue('multisites') as $multisite) {
$this->switchSiteContext($multisite);
$this->taskDrush()
->drush('state:set nobots 1')
->drush('sqlq')
->arg('truncate config_pages__su_site_url')
->run();
}
}
}

/**
* Perform actions after a site has been synced locally.
*
* @hook post-command drupal:sync:default:site
*/
public function postDrupalSync(){
$this->taskDrush()
->drush('sqlq')
->arg('truncate config_pages__su_site_url')
->run();
}

}
29 changes: 14 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@
}
],
"require": {
"acquia/blt": "^13.7",
"acquia/memcache-settings": "^1.2",
"php": ">=8.0",
"acquia/blt": "^13.5",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.6",
"drupal/acquia_connector": "^4.0",
"drupal/acquia_connector": "dev-4.x",
"drupal/acquia_purge": "^1.1",
"drupal/core": "^9.0",
"drupal/core-composer-scaffold": "^9",
"drupal/core-recommended": "^9.0",
"drupal/core": "^10",
"drupal/core-composer-scaffold": "^10",
"drupal/core-recommended": "^10",
"drupal/mysql56": "^1.1",
"drupal/paranoia": "^1.9",
"drush/drush": "^11.4",
"simplesamlphp/simplesamlphp": " ^1.19",
"su-hkku/cardinal_service_profile": "^10.1",
"su-sws/stanford_profile": "^10.1",
"su-sws/stanford_ssp": "^8.3"
"drush/drush": "^11.1",
"su-hkku/cardinal_service_profile": "11.x-dev",
"su-sws/stanford_profile": "11.x-dev"
},
"require-dev": {
"acquia/blt-drupal-test": "^1.0",
"acquia/blt-multisite": "^1.0",
"drupal/color": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"su-sws/blt-sws": "dev-main",
"su-sws/drupal-dev": "^8.2"
"su-sws/drupal-dev": "^10"
},
"replace": {
"drupal/coder": "*"
Expand Down Expand Up @@ -147,7 +147,7 @@
"Fix PHP 8 strict error with arrays": "patches/contrib/taxonomy_entity_index.patch"
},
"drupal/google_tag": {
"https://www.drupal.org/project/google_tag/issues/3370354": "patches/contrib/google_tag-ga_conflict.patch"
"Prevent google tag conflict": "patches/contrib/google_tag-ga_conflict.patch"
}
}
},
Expand All @@ -160,8 +160,7 @@
"cp lando/example.lando.yml .lando.yml",
"cp lando/example.local.blt.yml blt/local.blt.yml",
"cp lando/example.php.ini lando/php.ini",
"blt blt:init:settings",
"blt source:build:simplesamlphp-config"
"blt blt:init:settings"
]
},
"autoload": {
Expand Down
Loading

0 comments on commit 84d75bd

Please sign in to comment.