megclaypool of Rootid
4/25/2018 - 8:10 PM

How to update a Rootid Drupal 8 site (Pantheon one-click update merge conflicts)

We're installing our Pantheon D8 sites in /web to provoke merge conflicts and thus prevent us from appliying Pantheon's one click updates from the dashboard. We're using composer to manage our D8 sites, which is incompatible with the one-click updates. (So this isn't a bug, it's a feature!) Happily, we're pretty sure that Pantheon have moved all their magical secret sauce into modules and the settings file. In theory, none of it is in core anymore.

Instead:

  1. Pull a copy of the site onto your local
  2. Navigate to the /web directory of your site
  3. Use composer update drupal/core --with-dependencies to update using composer
-   Unfortunately, Composer sometimes installs nested .git directories, which make Pantheon very unhappy. So after you've updated, you need to find and remove any nested .git directories:
  1. Run find . -name .git -type d -prune to get a list of any new .git directories hiding in the bowels of your install. You might see something like: /web/vendor/afdafaf/adsfasdfdas/.git
  2. Remove them eg. rm -r /web/vendor/afdafaf/adsfasdfdas/.git
  3. Then add and commit all changes and push them back up to Pantheon
  4. Make sure to update the database and clear caches on Pantheon!