Update Your Project

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

Discuss in our Forum Discuss in Slack

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
  2. Update your project to the current Drupal stable version of core released on drupal.org with Composer:

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

    composer diff core

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

    git commit -m="Update to Drupal x.x.x"
      git push origin drupal-x.x.x
  5. 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.

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.