Skip to content

Commit

Permalink
Merge pull request #142 from palantirnet/2.2.x
Browse files Browse the repository at this point in the history
Drupal 8.8 readiness
  • Loading branch information
becw authored Dec 2, 2019
2 parents 340c9ba + 25f8413 commit 03abf6b
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 54 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Change Log

## 2.2.0

### 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

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.

```
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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"bin/the-build-installer"
],
"require": {
"continuousphp/phing-drush-task": "dev-master",
"palantirnet/phing-drush-task": "^1.1",
"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",
Expand Down
3 changes: 1 addition & 2 deletions defaults/install/drupal/settings.build-acquia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down
3 changes: 1 addition & 2 deletions defaults/install/drupal/settings.build-pantheon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
3 changes: 1 addition & 2 deletions defaults/install/drupal/settings.build-platformsh.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
3 changes: 1 addition & 2 deletions defaults/install/drupal/settings.build.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
18 changes: 18 additions & 0 deletions defaults/install/drush/drush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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'
21 changes: 0 additions & 21 deletions defaults/install/drush/drushrc.php

This file was deleted.

12 changes: 0 additions & 12 deletions defaults/install/drush/projectname.aliases.drushrc.php

This file was deleted.

2 changes: 2 additions & 0 deletions defaults/install/drush/sites/projectname.site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
local:
uri: '@uri@'
11 changes: 3 additions & 8 deletions targets/drupal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,13 @@ drupal:
</if>

<!-- Add a Drush alias for the multisite. -->
<property name="_multisite.drush_alias">@multisite_placeholder@
$aliases['local.${_multisite.key}'] = [
'uri' => '${_multisite.uri}',
];</property>

<reflexive file="drush/${projectname}.aliases.drushrc.php">
<copy file="${build.thebuild.dir}/defaults/install/drush/sites/projectname.site.yml" tofile="${application.startdir}/drush/sites/${_multisite.key}.site.yml" overwrite="true">
<filterchain>
<replacetokens>
<token key="multisite_placeholder" value="${_multisite.drush_alias}" />
<token key="uri" value="${_multisite.uri}" />
</replacetokens>
</filterchain>
</reflexive>
</copy>

<!-- Whitespace is intentional. -->
<echo>
Expand Down
8 changes: 5 additions & 3 deletions targets/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,16 @@
<copy file="${phing.dir.install}/../defaults/install/drupal/settings.build.php" todir="${application.startdir}/.the-build/drupal" />

<!-- Copy Drush configuration and aliases file templates. -->
<copy file="${phing.dir.install}/../defaults/install/drush/drushrc.php" tofile="${application.startdir}/drush/drushrc.php" overwrite="true">
<copy file="${phing.dir.install}/../defaults/install/drush/drush.yml" tofile="${application.startdir}/drush/drush.yml" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<copy file="${phing.dir.install}/../defaults/install/drush/projectname.aliases.drushrc.php" tofile="${application.startdir}/drush/${projectname}.aliases.drushrc.php" overwrite="true">
<copy file="${phing.dir.install}/../defaults/install/drush/sites/projectname.site.yml" tofile="${application.startdir}/drush/sites/${projectname}.site.yml" overwrite="true">
<filterchain>
<expandproperties />
<replacetokens>
<token key="uri" value="${drupal.sites.default.uri}" />
</replacetokens>
</filterchain>
</copy>

Expand Down

0 comments on commit 03abf6b

Please sign in to comment.