From 199c22f21bee14e9cae5f47768fb8c68254a46ad Mon Sep 17 00:00:00 2001 From: Bec White Date: Thu, 31 Oct 2019 15:17:23 -0500 Subject: [PATCH 01/10] Require Drush 9, and an updated version of continuousphp/phing-drush-task that is compatible with Drush 9. --- composer.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b62f316b..83d9db2b 100644 --- a/composer.json +++ b/composer.json @@ -11,10 +11,16 @@ "bin": [ "bin/the-build-installer" ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/becw/phing-drush-task" + } + ], "require": { - "continuousphp/phing-drush-task": "dev-master", + "continuousphp/phing-drush-task": "dev-drush-9", "drupal/coder": "~8.2.12", - "drush/drush": "^8.1.15@dev", + "drush/drush": "^9.0", "pear/http_request2": "^2.3", "pear/versioncontrol_git": "@dev", "phing/phing": "^2.14", From 24c20acbcfe33e3608d56bcaf106cb22eb361ec6 Mon Sep 17 00:00:00 2001 From: Bec White Date: Thu, 31 Oct 2019 15:18:40 -0500 Subject: [PATCH 02/10] Update changelog for Drush 9 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f0db5a2..5dbb9181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## UNRELEASED + +### Added + +### Fixed + +### Changed + +* Updated from Drush 8 to Drush 9 + ## Release 2.1.2 ### Changed From 7580c374dbac4863daffb3be35940ce0f7044ef1 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 12:13:24 -0600 Subject: [PATCH 03/10] Use our own fork of phing-drush-task. --- composer.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 83d9db2b..701dae6a 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,8 @@ "bin": [ "bin/the-build-installer" ], - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/becw/phing-drush-task" - } - ], "require": { - "continuousphp/phing-drush-task": "dev-drush-9", + "palantirnet/phing-drush-task": "^1.1", "drupal/coder": "~8.2.12", "drush/drush": "^9.0", "pear/http_request2": "^2.3", From 63b647c10b549d2fc65ee6481d12e256838f979e Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 14:27:45 -0600 Subject: [PATCH 04/10] Update drushrc.php to drush.yml --- defaults/install/drush/drush.yml | 21 +++++++++++++++++++++ defaults/install/drush/drushrc.php | 21 --------------------- targets/install.xml | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 defaults/install/drush/drush.yml delete mode 100644 defaults/install/drush/drushrc.php diff --git a/defaults/install/drush/drush.yml b/defaults/install/drush/drush.yml new file mode 100644 index 00000000..c1d64e7e --- /dev/null +++ b/defaults/install/drush/drush.yml @@ -0,0 +1,21 @@ +options: + # root: '/var/www/your-project.local/web' + +command: + sql: + dump: + options: + # Omit cache and similar tables from sql:dump and sql:sync operations. + structure-tables-key: common + +sql: + # List of tables whose *data* is skipped by the 'sql-dump' and 'sql-sync' + # commands when the "--structure-tables-key=common" option is provided. + structure-tables: + common: + - 'cache' + - 'cache_*' + - 'history' + - 'search_*' + - 'sessions' + - 'watchdog' diff --git a/defaults/install/drush/drushrc.php b/defaults/install/drush/drushrc.php deleted file mode 100644 index 642cf389..00000000 --- a/defaults/install/drush/drushrc.php +++ /dev/null @@ -1,21 +0,0 @@ - /dev/null', $output); -if (!empty($output)) { - $repo = current($output); - - # Configure Drush for the current project. - $options['root'] = "{$repo}/${drupal.root}"; -} - -/** - * Using the flag "--structure-tables-key=common" on sql-dump and sql-sync will cause - * the structure but not the data to be dumped for these tables. - */ -$options['structure-tables']['common'] = array('cache', 'cache_*', 'history', 'search_*', 'sessions', 'watchdog'); diff --git a/targets/install.xml b/targets/install.xml index 613fb3e6..55745ffe 100644 --- a/targets/install.xml +++ b/targets/install.xml @@ -164,7 +164,7 @@ - + From 5f6aff6f5fed8c34e1c47959e45210e5497fde31 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 14:50:52 -0600 Subject: [PATCH 05/10] Update site aliases for drush 9 --- .../install/drush/projectname.aliases.drushrc.php | 12 ------------ defaults/install/drush/sites/projectname.site.yml | 2 ++ targets/drupal.xml | 11 +++-------- targets/install.xml | 6 ++++-- 4 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 defaults/install/drush/projectname.aliases.drushrc.php create mode 100644 defaults/install/drush/sites/projectname.site.yml diff --git a/defaults/install/drush/projectname.aliases.drushrc.php b/defaults/install/drush/projectname.aliases.drushrc.php deleted file mode 100644 index f7307060..00000000 --- a/defaults/install/drush/projectname.aliases.drushrc.php +++ /dev/null @@ -1,12 +0,0 @@ - '${drupal.sites.default.uri}', -]; - -// Multisites created by `phing drupal-add-multisite` will be automatically added here. -// @multisite_placeholder@ diff --git a/defaults/install/drush/sites/projectname.site.yml b/defaults/install/drush/sites/projectname.site.yml new file mode 100644 index 00000000..0ce6c3ec --- /dev/null +++ b/defaults/install/drush/sites/projectname.site.yml @@ -0,0 +1,2 @@ +local: + uri: '@uri@' diff --git a/targets/drupal.xml b/targets/drupal.xml index 0e7a94e3..ec15adfa 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -406,18 +406,13 @@ drupal: - @multisite_placeholder@ - $aliases['local.${_multisite.key}'] = [ - 'uri' => '${_multisite.uri}', - ]; - - + - + - + diff --git a/targets/install.xml b/targets/install.xml index 55745ffe..142edbdb 100644 --- a/targets/install.xml +++ b/targets/install.xml @@ -169,9 +169,11 @@ - + - + + + From b72910c75330fb36be8d76642dc5d62b8e3b5ec3 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 15:01:40 -0600 Subject: [PATCH 06/10] Drush now detects the web root. --- defaults/install/drush/drush.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/defaults/install/drush/drush.yml b/defaults/install/drush/drush.yml index c1d64e7e..de6da915 100644 --- a/defaults/install/drush/drush.yml +++ b/defaults/install/drush/drush.yml @@ -1,6 +1,3 @@ -options: - # root: '/var/www/your-project.local/web' - command: sql: dump: From bbeb6f88d9d7d14eec4f01d67d23562ceaf71be5 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 15:40:05 -0600 Subject: [PATCH 07/10] Add instructions on updating to Drush 9. --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dbb9181..e2e4703d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,21 @@ * Updated from Drush 8 to Drush 9 +### Updating from 2.1 + +This change requires a lot of dependency math! The easiest way to resolve it is to remove the-build from the requirements, and then re-add it. + +``` +composer remove --dev palantirnet/the-build +composer require --dev palantirnet/the-build +``` + +Afterwards, you'll need to update the drush configuration in your project: + +* Remove `drush/drushrc.php` +* Optional: copy `vendor/palantirnet/the-build/defaults/install/drush/drush.yml` to `drush/drush.yml` +* Migrate your site aliases by running `drush site:alias-convert` from within your VM (otherwise you'll get any global drush aliases you have set up) + ## Release 2.1.2 ### Changed From c0c0ac23797a31fbbbb5dc923dc33694f76c8efe Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 17:25:00 -0600 Subject: [PATCH 08/10] Update the settings.*.php templates to set the config_sync_directory using $settings rather than $config_directories. See https://www.drupal.org/node/3018145 --- defaults/install/drupal/settings.build-acquia.php | 3 +-- defaults/install/drupal/settings.build-pantheon.php | 3 +-- defaults/install/drupal/settings.build-platformsh.php | 3 +-- defaults/install/drupal/settings.build.php | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/defaults/install/drupal/settings.build-acquia.php b/defaults/install/drupal/settings.build-acquia.php index 97eea493..cb1c4e79 100644 --- a/defaults/install/drupal/settings.build-acquia.php +++ b/defaults/install/drupal/settings.build-acquia.php @@ -12,8 +12,7 @@ $settings['file_private_path'] = "/mnt/gfs/{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}/files-private"; $config['system.file']['path']['temporary'] = $_ENV['TEMP']; -$config_directories = []; -$config_directories[CONFIG_SYNC_DIRECTORY] = '${drupal.site.config_sync_directory}'; +$settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; // Enable/disable config_split configurations. if (isset($_ENV['AH_PRODUCTION']) && $_ENV['AH_PRODUCTION']) { diff --git a/defaults/install/drupal/settings.build-pantheon.php b/defaults/install/drupal/settings.build-pantheon.php index c118069a..0639ce7a 100644 --- a/defaults/install/drupal/settings.build-pantheon.php +++ b/defaults/install/drupal/settings.build-pantheon.php @@ -5,8 +5,7 @@ * Drupal settings file template for use on Pantheon environments. */ -$config_directories = []; -$config_directories[CONFIG_SYNC_DIRECTORY] = '${drupal.site.config_sync_directory}'; +$settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; // Enable/disable config_split configurations. if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { diff --git a/defaults/install/drupal/settings.build-platformsh.php b/defaults/install/drupal/settings.build-platformsh.php index 392c7cb2..43702a5a 100644 --- a/defaults/install/drupal/settings.build-platformsh.php +++ b/defaults/install/drupal/settings.build-platformsh.php @@ -5,8 +5,7 @@ * Drupal settings file template for use on Platform.sh environments. */ -$config_directories = []; -$config_directories[CONFIG_SYNC_DIRECTORY] = '${drupal.site.config_sync_directory}'; +$settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; // Enable/disable config_split configurations. if (isset($_ENV['PLATFORM_BRANCH'])) { diff --git a/defaults/install/drupal/settings.build.php b/defaults/install/drupal/settings.build.php index e812a194..45cbd9be 100644 --- a/defaults/install/drupal/settings.build.php +++ b/defaults/install/drupal/settings.build.php @@ -14,8 +14,7 @@ 'collation' => 'utf8mb4_general_ci', ); -$config_directories = array(); -$config_directories[CONFIG_SYNC_DIRECTORY] = '${drupal.site.config_sync_directory}'; +$settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; $settings['hash_salt'] = '${drupal.site.hash_salt}'; $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml'; From bb06ae79c9af49a510fb47b7b2851d0e64adba9d Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 17:29:58 -0600 Subject: [PATCH 09/10] Update the changelog. This change means that this version of the-build is only compatible with Drupal 8.8 and higher. --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2e4703d..a93f8215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,13 @@ ### Changed * Updated from Drush 8 to Drush 9 +* Changed how the `config_sync_directory` is handled for Drupal 8.8 - see [drupal.org/node/3018145](https://www.drupal.org/node/3018145) ### Updating from 2.1 -This change requires a lot of dependency math! The easiest way to resolve it is to remove the-build from the requirements, and then re-add it. +This version is only compatible with Drupal 8.8 and higher. + +The Drush update requires a lot of dependency math! The easiest way to resolve it is to remove the-build from the requirements, and then re-add it. ``` composer remove --dev palantirnet/the-build From 25f8413e0f8ffe6cbd00c61e93eb6ee406fa9e0c Mon Sep 17 00:00:00 2001 From: Bec White Date: Mon, 2 Dec 2019 17:41:27 -0600 Subject: [PATCH 10/10] Update the changelog for the 2.2.0 release --- CHANGELOG.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a93f8215..2771d7fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,6 @@ # Change Log -## UNRELEASED - -### Added - -### Fixed +## 2.2.0 ### Changed @@ -13,7 +9,7 @@ ### Updating from 2.1 -This version is only compatible with Drupal 8.8 and higher. +Your Drupal site must be running Drupal 8.8 to use the-build version 2.2 and newer. The Drush update requires a lot of dependency math! The easiest way to resolve it is to remove the-build from the requirements, and then re-add it.