From 7717d00bdc707cf41fac6d5fba086a611495baa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa=20Silva?= <1574795+joaocsilva@users.noreply.github.com> Date: Thu, 4 May 2023 15:04:05 +0200 Subject: [PATCH 1/3] DQA-6954: Remove sudo references (#672) --- src/TaskRunner/Commands/BuildCommands.php | 4 ++-- tests/fixtures/commands/build.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TaskRunner/Commands/BuildCommands.php b/src/TaskRunner/Commands/BuildCommands.php index 4034337ec..a7fd849fc 100644 --- a/src/TaskRunner/Commands/BuildCommands.php +++ b/src/TaskRunner/Commands/BuildCommands.php @@ -332,8 +332,8 @@ public function buildAssets(ConsoleIO $io, array $options = [ $collection = $this->collectionBuilder(); $collection->taskExecStack() ->dir($theme_dir) - ->exec('sudo apt-get update') - ->exec('sudo apt-get install ruby-sass -y') + ->exec('apt-get update') + ->exec('apt-get install ruby-sass -y') ->stopOnFail(); } else { $themeTaskRunner = $options['theme-task-runner']; diff --git a/tests/fixtures/commands/build.yml b/tests/fixtures/commands/build.yml index 06f32c152..36dc30466 100644 --- a/tests/fixtures/commands/build.yml +++ b/tests/fixtures/commands/build.yml @@ -190,8 +190,8 @@ - contains: | [Simulator] Simulating ExecStack() ->dir('/test/toolkit/tests/sandbox/BuildCommandsTest/code/theme') - ->exec('sudo apt-get update') - ->exec('sudo apt-get install ruby-sass -y') + ->exec('apt-get update') + ->exec('apt-get install ruby-sass -y') ->stopOnFail() [Simulator] Simulating ExecStack() ->exec('cp /test/toolkit/resources/assets/Gruntfile.js /test/t ... /theme/Gruntfile.js') From d67242f8a45bec43063f4508ee4d1b471b58df6e Mon Sep 17 00:00:00 2001 From: Cristiano Gomes Date: Thu, 4 May 2023 14:05:53 +0100 Subject: [PATCH 2/3] DQA-6889: runner.yml.dist - forcing reverse proxy settings for all repo (#671) --- runner.yml.dist | 3 +++ src/TaskRunner/Commands/DrupalCommands.php | 6 ++++++ tests/fixtures/commands/configuration.yml | 4 ++-- .../commands/drupal-settings-setup.yml | 18 ++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/runner.yml.dist b/runner.yml.dist index e4ab2bec7..daee637df 100644 --- a/runner.yml.dist +++ b/runner.yml.dist @@ -15,3 +15,6 @@ toolkit: - toolkit:test-phpmd - toolkit:lint-php - toolkit:test-phpstan + test: + phpunit: + options: 'fail-on-incomplete fail-on-risky fail-on-skipped fail-on-warning' diff --git a/src/TaskRunner/Commands/DrupalCommands.php b/src/TaskRunner/Commands/DrupalCommands.php index d37dedcb9..e74bc7259 100644 --- a/src/TaskRunner/Commands/DrupalCommands.php +++ b/src/TaskRunner/Commands/DrupalCommands.php @@ -555,6 +555,12 @@ protected function getToolkitSettingsBlock() \$settings['file_private_path'] = getenv('DRUPAL_PRIVATE_FILE_SYSTEM') !== FALSE ? getenv('DRUPAL_PRIVATE_FILE_SYSTEM') : 'sites/default/private_files'; \$settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp'; +// Reverse proxy +if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) { + \$settings["reverse_proxy"] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE'); + \$settings["reverse_proxy_addresses"] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES')); +} + {$additionalSettings} // Load environment development override configuration, if available. diff --git a/tests/fixtures/commands/configuration.yml b/tests/fixtures/commands/configuration.yml index 11ba3be40..66914c58c 100644 --- a/tests/fixtures/commands/configuration.yml +++ b/tests/fixtures/commands/configuration.yml @@ -114,7 +114,7 @@ - { task: process, source: behat.yml.dist, destination: behat.yml } resources: [] expectations: - - str_contains: | + - string_contains: | Description: Setup the behat file @@ -122,7 +122,7 @@ example:full full example:full --simulate - - str_contains: | + - string_contains: | Help: Some help text diff --git a/tests/fixtures/commands/drupal-settings-setup.yml b/tests/fixtures/commands/drupal-settings-setup.yml index 099b7658a..cee2d76c8 100644 --- a/tests/fixtures/commands/drupal-settings-setup.yml +++ b/tests/fixtures/commands/drupal-settings-setup.yml @@ -36,6 +36,12 @@ $settings['file_private_path'] = getenv('DRUPAL_PRIVATE_FILE_SYSTEM') !== FALSE ? getenv('DRUPAL_PRIVATE_FILE_SYSTEM') : 'sites/default/private_files'; $settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp'; + // Reverse proxy + if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) { + $settings["reverse_proxy"] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE'); + $settings["reverse_proxy_addresses"] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES')); + } + // Load environment development override configuration, if available. @@ -87,6 +93,12 @@ $settings['file_private_path'] = getenv('DRUPAL_PRIVATE_FILE_SYSTEM') !== FALSE ? getenv('DRUPAL_PRIVATE_FILE_SYSTEM') : 'sites/default/private_files'; $settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp'; + // Reverse proxy + if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) { + $settings["reverse_proxy"] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE'); + $settings["reverse_proxy_addresses"] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES')); + } + $config['cas.settings']['server']['hostname'] = getenv('CAS_HOSTNAME'); $config['cas.settings']['server']['port'] = getenv('CAS_PORT'); @@ -139,6 +151,12 @@ $settings['file_private_path'] = getenv('DRUPAL_PRIVATE_FILE_SYSTEM') !== FALSE ? getenv('DRUPAL_PRIVATE_FILE_SYSTEM') : 'sites/default/private_files'; $settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp'; + // Reverse proxy + if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) { + $settings["reverse_proxy"] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE'); + $settings["reverse_proxy_addresses"] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES')); + } + // Load environment development override configuration, if available. From c6a7c08a4f2e7d18bd2bf71dbcb08765f2aa46c5 Mon Sep 17 00:00:00 2001 From: Joao Silva Date: Thu, 4 May 2023 15:12:37 +0200 Subject: [PATCH 3/3] Prepare release 9.9.2 --- CHANGELOG.md | 4 ++++ docs/guide/commands.rst | 5 ++--- phpdoc.dist.xml | 2 +- src/Toolkit.php | 2 +- tests/fixtures/commands/tool.yml | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b81e86203..5b640360c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Toolkit change log +## Version 9.9.2 + - DQA-6954: Remove sudo references. + - DQA-6889: runner.yml.dist - forcing reverse proxy settings for all repo. + ## Version 9.9.1 - DQA-6871: GitHooks detect docker-compose VS docker compose. - DQA-6930: Toolkit allow to skip abandoned components. diff --git a/docs/guide/commands.rst b/docs/guide/commands.rst index c35cf6a0e..ad21389a0 100644 --- a/docs/guide/commands.rst +++ b/docs/guide/commands.rst @@ -14,10 +14,9 @@ See bellow current list of available commands: .. code-block:: Available commands: - completion Dump the shell completion script config Dumps the current or given configuration. - help Display help for a command - list List commands + help Displays help for a command + list Lists commands docker docker:refresh-configuration [dk-rc] Update docker-compose.yml file based on project's configurations. drupal diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index 7b85dfcc7..d7bca27f1 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -9,7 +9,7 @@ docs - + latest diff --git a/src/Toolkit.php b/src/Toolkit.php index 92f88ce48..e547b80b7 100644 --- a/src/Toolkit.php +++ b/src/Toolkit.php @@ -14,7 +14,7 @@ final class Toolkit /** * Constant holding the current version. */ - public const VERSION = '9.9.1'; + public const VERSION = '9.9.2'; /** * Returns the Toolkit root. diff --git a/tests/fixtures/commands/tool.yml b/tests/fixtures/commands/tool.yml index 3a4ddcfc9..52456b799 100644 --- a/tests/fixtures/commands/tool.yml +++ b/tests/fixtures/commands/tool.yml @@ -86,7 +86,7 @@ [WARNING] Failed to get Toolkit version from composer.lock. Minimum version: ^9.6 - Current version: 9.9.1 + Current version: 9.9.2 Version check: OK - command: toolkit:check-version @@ -99,7 +99,7 @@ > Checking Toolkit version: Minimum version: ^9.6 - Current version: 9.9.1 + Current version: 9.9.2 Version check: OK - command: toolkit:vendor-list