Skip to content

Commit

Permalink
Update restart to display ULI
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSanford committed May 2, 2024
1 parent 746e4c6 commit 9175924
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 17 deletions.
31 changes: 24 additions & 7 deletions src/Robo/Plugin/Commands/DrupalDaemonLocalDeployCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ class DrupalDaemonLocalDeployCommands extends DockworkerDaemonCommands
* Ensure that the local application deployment is tidied up for a restart.
*
* @hook on-event dockworker-pre-local-restart-actions
*
*/
public function preRestartDrupalActions(): void
{
$this->initOptions();
$this->initDockworkerIO();
$this->preInitDockworkerPersistentDataStorageDir();
$this->registerDockerCliTool($this->dockworkerIO);
$devel_modules = [
'devel',
'devel_generate',
'devel_php',
'devel_reinstall',
'devel_node_access',
];
$command = [
'drush',
Expand All @@ -46,13 +44,32 @@ public function preRestartDrupalActions(): void
$this->dockworkerIO,
'Disabling Development Modules',
sprintf(
"[%s] Disabling development modules: %s'...",
"[%s] Disabling development modules: %s...",
'local',
implode(' ', $devel_modules)
implode(',', $devel_modules)
)
);
}

/**
* Informs the user of useful information after a successful deployment.
*
* This is necessary as it doesn't seem multiple hooks can be added to a method.
*
* @param mixed $result
* The result of the command.
* @param \Consolidation\AnnotatedCommand\CommandData $commandData
* The command data.
*
* @hook post-command application:restart
*/
public function displayDrupalLocalLinksAfterRestart(
$result,
CommandData $commandData
): void {
$this->displayDrupalLocalLinks($result, $commandData, 'Restart');
}

/**
* Informs the user of useful information after a successful deployment.
*
Expand Down
34 changes: 24 additions & 10 deletions test/composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
{
"name": "unb-libraries/test-dockworker-drupal",
"repositories": [
{
"type": "path",
"url": "../"
}
],
"name": "unb-libraries/dockworker-drupal",
"description": "Extends the dockworker application to deploy and develop Drupal applications via a consistent and unified workflow.",
"type": "library",
"require": {
"unb-libraries/dockworker-drupal": "*"
"drupal/coder": "^8",
"ext-yaml": "*",
"unb-libraries/dockworker-daemon": "6.x-dev"
},
"require-dev": {
"phpstan/phpstan": "^1",
"squizlabs/php_codesniffer": "^3"
},
"license": "MIT",
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
{
"name": "UNB Libraries",
"email": "libsupport@unb.ca"
}
],
"autoload": {
"psr-4": {
"Dockworker\\": "src"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"php-http/discovery": true
"php-http/discovery": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit 9175924

Please sign in to comment.