Last Reviewed: December 12, 2022
Create a New Branch with Integrated Composer Code
The first step in the migration process is to create a new branch with Integrated Composer.
Create a local clone of the Custom Upstream repository using the SSH URL and change the directory into the cloned repository:
git clone $SSH_URL cd $REPOSITORY_NAME
Add the Integrated Composer upstream as a second remote and fetch:
git remote add ic https://github.com/pantheon-upstreams/drupal-composer-managed.git && git fetch ic
Create a new
composerify
branch to work in:git checkout -b composerify
On the
composerify
branch, use Git to remove all the files in the directory and commit the change. This is because you are going to completely replace the file structure and re-add customizations:git rm -rf * && git commit -m "Removing all files"
Add and commit files from the Integrated Composer upstream:
git checkout ic/main . git add $FILE_NAME git commit -m "Add and commit Integrated Composer files"
Navigate to
composer.json
in your text editor and change thedrupal/core-recommended
version to the version of Drupal you are currently on:upstream-configuration/composer.json"drupal/core-recommended": "^9"
Commit the change:
git commit -am "Setting Drupal core version to ^9"