Skip to content

Instantly share code, notes, and snippets.

@scottalan
Last active February 27, 2018 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottalan/7b250b577a313b7f69d3db913ac22104 to your computer and use it in GitHub Desktop.
Save scottalan/7b250b577a313b7f69d3db913ac22104 to your computer and use it in GitHub Desktop.
Updating Lightning from 2.1.5 to 3.0.2
Add:
{
"type": "composer",
"url": "https://asset-packagist.org"
},
# Remove: "drupal/core": "~8.3"
# Change: "acquia/lightning": "~2.1.0"
# Remove: "drupal/video_embed_field": "^1.5"
# Remove: "drupal/image_widget_crop": "2.1"
# Change: "simplesamlphp/simplesamlphp": "~1.14.0"
# Change: drupal/simplesamlphp_auth": "~3.0"
# Remove: "roave/security-advisories": "dev-master (simplesamlphp/simplesamlphp v1.14.0 conflicts with roave/security-advisories[dev-master])
Remove:
"2893566 - Update CKEditor library to 4.7.1": "https://www.drupal.org/files/issues/ckeditor_4.7.1-2893566-7.patch",
"2904142 - Update CKEditor library to 4.7.2": "https://www.drupal.org/files/issues/ckeditor_4.7.2.-2904142-2.patch",
"2908864 - Update CKEditor library to 4.7.3": "https://www.drupal.org/files/issues/2908864-ckeditor_4.7.3.patch",
"2081521 - Add extra class or id to li.vertical-tab-button": "https://www.drupal.org/files/issues/add_extra_class_or_id-2081521-10.patch"
"drupal/image_widget_crop": {
"2925403 - $properties could be set to NULL if overriding crop list": "https://www.drupal.org/files/issues/image_widget_crop-avoid_null_properties-2925403-1.patch"
}
# works with webform 8.x-5.0-beta23 - https://www.drupal.org/node/2920513
"drupal/webform": {
"2920513 - CKEDITOR: autogrow and undefinedlink plugin not found": "https://www.drupal.org/files/issues/ckeditor_autogrow_and-2920513-7.patch"
}
# Committed in 1.0.0-rc2
"2869554 - The group_roles field gets created too early during configuration sync.": "https://www.drupal.org/files/issues/group-2869554-4.patch"
# Need an update hook:
#$modules = ['atmos_field_storage', 'atmos_node_article', 'atmos_node_basic_page', 'atmos_node_landing_page', 'atmos_node_site_alert'];
#foreach ($modules as $module) {
# $query = \Drupal::database()->delete('key_value')
# ->condition('collection', 'system.schema')
# ->condition('name', $module')
# ->execute();
#}
The following module is missing from the file system: atmos_field_storage bootstrap.inc:250 [warning]
The following module is missing from the file system: atmos_node_article bootstrap.inc:250 [warning]
The following module is missing from the file system: atmos_node_basic_page bootstrap.inc:250 [warning]
The following module is missing from the file system: atmos_node_landing_page bootstrap.inc:250 [warning]
The following module is missing from the file system: atmos_node_site_alert bootstrap.inc:250
### START HERE RUNNING SETS OF COMMANDS AFTER ^ ######
${DOCKER_CMD} composer "require bower-asset/dropzone oomphinc/composer-installers-extender --no-update" && \
${DOCKER_CMD} composer "run enable-asset-packagist --working-dir=build/html/profiles/contrib/lightning"
##### Fix the location of the libraries that were added.
# Media gets added to core in 8.4.0 (lightning 2.2.0)
# Replace references to Drupal\media_entity\Entity\Media -> Drupal\media\Entity\Media
# after that update.
#
# Lightning migrates to core media https://lightning.acquia.com/blog/lightning-migration-core-media
# https://www.drupal.org/project/drupal/issues/2896630
# ${DOCKER_CMD} cli "cd build/html && curl https://www.drupal.org/files/issues/2896630-13_0.patch | patch -p1" && \
# Check lightning.info.yml and make sure version: 8.x-2.20 is updated
${DOCKER_CMD} composer "require acquia/lightning:2.2.0 balsama/lightning_strict:2.2.0 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
# Patch that might be handled in wbm2cm:
# "2896630 - Unofficial content_moderation 8.3.7 to 8.4.0 upgrade path" : "https://www.drupal.org/files/issues/2896630-13_0.patch"
# Change: "drupal/search_api": "~1.4.0 || ~1.5.0"
# Check https://github.com/acquia/lightning/blob/2.2.1/UPDATE.md#220-to-221
${DOCKER_CMD} composer "require acquia/lightning:2.2.1 balsama/lightning_strict:2.2.1 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
@todo:
Configuration updates
Visit Structure > Content types. For each moderated content type, click "Manage form display", then drag the "Publishing status" field into the "Disabled" section and press "Save".
Remove "balsama/lightning_strict": "2.2.0",
Change "acquia/lightning": "^2.2"
${DOCKER_CMD} composer "require acquia/lightning:^2.2 --no-update" && \
${DOCKER_CMD} composer "update acquia/lightning --with-all-dependencies" && \
${DOCKER_CMD} composer update drupal/core
# In order to run the Media Entity updates, please make sure all modules
# that provide plugins for Media Entity (or depend on it) have their code
# updated to their respective 2.x branches. Note that you will probably need
# to revert to the 1.x branch of the Media Entity module if you want to
# uninstall existing plugin modules. The following modules provide source
# plugins and need to be upgraded: media_entity_slideshow.
# The following modules depend on media entity and need to be either
# upgraded or uninstalled: media_entity_slideshow.
${DOCKER_CMD} composer "require drupal/media_entity_slideshow:~2.0.0-alpha1" && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
${DOCKER_CMD} composer "why-not acquia/lightning:2.2.2"
# acquia/lightning 2.2.2 requires drupal/crop (^1.3)
# atmosphere dev-composer-1 does not require drupal/crop (but 1.2.0 is installed)
#Remove
#"drupal/media_entity": {
# "Reset D.O packaging information so subsequent patches apply":
# "https://www.drupal.org/files/issues/media_entity-reset-packaging--add-version.patch",
# "2880334 - Add update path of media_entity config changes from 1.x to core media module":
# "https://www.drupal.org/files/issues/media-entity-1.6--c564fc4.diff",
# "2918172 - Media Entity upgrade -> core fails on absent column revision_uid":
# "https://www.drupal.org/files/issues/2918172-5.patch",
# "2918166 - Media Entity should uninstall itself after migration to core Media is complete":
# "https://www.drupal.org/files/issues/2918166-7.patch",
# "2919381 - Don't cache media_entity_type_plugins":
# "https://www.drupal.org/files/issues/2919381-2.patch",
# "2919754 - non-existent service 'plugin.manager.media_entity.type'":
# "https://www.drupal.org/files/issues/media_entity-drush_updatedb-2919754-6-D8.patch"
#},
DOCKER_CMD} composer "require acquia/lightning:2.2.2 balsama/lightning_strict:2.2.2 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
${DOCKER_CMD} composer "require acquia/lightning:2.2.3 balsama/lightning_strict:2.2.3 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
# Follow https://github.com/acquia/lightning/blob/2.2.4/UPDATE.md#223-to-224
# 2.2.3 to 2.2.4
# Visit Structure > Media types. For each media type, click "Manage display"
# and select the "Embedded" display. Then drag the "Name" field into the
# "Disabled" section and press "Save".
# To migrate to Content Moderation, install the wbm2cm module and Drush
# (8.x or 9.x). Back up your database, then run drush wbm2cm-migrate to run
# the migration.
# If you previously used a sub-profile to exclude Lightning Workflow's
# "Schedule Publication" sub-component (its machine name is
# lightning_scheduled_updates), you will need to update your sub-profile's
# excluded dependencies to exclude lightning_scheduler instead, which replaces
# lightning_scheduled_updates in this release.
${DOCKER_CMD} composer "require acquia/lightning:2.2.4 balsama/lightning_strict:2.2.4 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning" && \
${DOCKER_CMD} drush "en wbm2cm -y" && \
${DOCKER_CMD} drush wbm2cm-migrate
${DOCKER_CMD} composer "require acquia/lightning:2.2.5 balsama/lightning_strict:2.2.5 --no-update" && \
${DOCKER_CMD} composer update && \
${DOCKER_CMD} drush cr && \
${DOCKER_CMD} drush "updb -y" && \
${DOCKER_CMD} drupal "update:lightning"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment