Manage Custom Upstream Dependencies
Learn how to manage dependencies for your Custom Upstream.
This section provides information on how to manage dependencies for an existing Custom Upstream.
Add Dependencies to Your Upstream
Clone the Git repository for your Custom Upstream.
Require the Custom Upstream management package if you have not already:
composer require pantheon-systems/upstream-managementRun the
composer upstream:requirecommand for each dependency:composer upstream-require drupal/pkg-name [--no-update]Commit and push your changes to your
composer.jsonfile. Remember to not commit thecomposer.lockfile.
Update Dependencies in Your Upstream
You may need to pin specific versions of your dependencies in your Custom Upstream. This is normally done with the composer.lock file. However, including the composer.lock file in the root of the Custom Upstream causes merge conflicts with your downstream sites. You can use the upstream:update-dependencies composer command to solve this problem.
Run
composer update-upstream-dependenciesin your custom upstream repository. Theupstream:update-dependenciescommand will:Create or update a
upstream-configuration/composer.lockfile.Create or update a
upstream-configuration/locked/composer.jsonfile with all packages fromcomposer.lockand their pinned versions.Update the top-level
composer.jsonrepositories section forupstream-configurationto useupstream-configuration/lockedinstead of justupstream-configuration(if not done previously).
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 Custom Upstream.