Skip to main content
Last Reviewed: 2026-11-20

Upstreams on Pantheon

Manage Upstream Dependencies

Learn how to manage dependencies for your upstream.


This section provides information on how to manage dependencies for an existing upstream.

Add Dependencies to Your Upstream

  1. Clone the Git repository for your upstream.

  2. Require the upstream management package if you have not already:

  3. Run the composer upstream:require command for each dependency:

  4. Commit and push your changes to your composer.json file. Remember to not commit the composer.lock file.

    The composer.lock file should not be added to your .gitignore file, since it must still be committed for individual sites created from your upstream. Instead, run the following command to prevent yourself from accidentally committing it while working directly in the upstream repository:

Update Dependencies in Your Upstream

You may need to pin specific versions of your dependencies in your upstream. This is normally done with the composer.lock file. However, including the composer.lock file in the root of the upstream causes merge conflicts with your downstream sites. You can use the upstream:update-dependencies composer command to solve this problem.

  1. Run composer update-upstream-dependencies in your upstream repository. The upstream:update-dependencies command will:

    • Create or update a upstream-configuration/composer.lock file.

    • Create or update a upstream-configuration/locked/composer.json file with all packages from composer.lock and their pinned versions.

    • Update the top-level composer.json repositories section for upstream-configuration to use upstream-configuration/locked instead of just upstream-configuration (if not done previously).

  2. Commit the changes and begin using the pinned versions in your downstream sites. This allows you to make sure that you use specific versions for the packages in your upstream.

More resources