Update Your Project

In step nine of the Build Tools guide, learn how to update your site as part of the continuous integration process.

Tweet

In this lesson, we'll take a closer look at how to update dependencies in a Composer workflow.

Update Core

  1. Start by creating a new branch based off the tip of master (replace drupal-8.3.7 according to your current task):

    git checkout -b drupal-8.3.7 master
  1. Update your project to the current Drupal 8 stable version of core released on drupal.org with Composer:

    composer update drupal/core
  2. Run git diff composer.lock to see the updated dependency details:

    composer diff core

  3. Commit the updated composer.lock file and push a new branch up to GitHub, for example (replace drupal-8.3.7 according to your current task):

    git commit -m="Update to Drupal 8.3.7"
      git push origin drupal-8.3.7
  1. Return to GitHub and compare your feature branch against master. You should see all commits made locally here in GitHub. Click Create Pull Request and go through your team's standard peer review process.

    Composer update pr

Use this process to update any dependency required by your project's composer.json file. The site should never receive Pantheon's One-click updates in the Pantheon Site Dashboard, Drupal's Admin interface, or Drush to update core, as none of these techniques modify the composer.json file. You must update core using Composer exclusively.