Date last updated: April 7, 2020
Project status: In development
Welcome to Early Access for Pantheon’s Integrated Composer solution!
This documentation has everything you need to get started and provide feedback as we continue to develop this feature.
- Lean repository & zero build artifacts on master branch
- 1-click updates for both upstream commits and Composer dependencies
- Integrated build step & no need for 3rd-party integrations
- Downstream sites can be customized and continue to receive upstream updates
- Not meant for production use (yet)
- Sites must be created with
ic-demo-2020-
site name prefix - Sites will be deleted without notice
- Only tested with Drupal 8
Other existing solutions may be a better fit for your needs. For example, if your continuous integration requires automated testing, or operations other than running composer update
or composer install
, consider integrating with a 3rd-party CI service using Terminus Build Tools.
- Fork the Pantheon-maintained experimental Drupal 8 template: pantheon-upstreams/drupal-project. For detailed steps see the general documentation on custom upstreams: Create and Host the Repository Remotely.
- Add a new custom upstream on the Pantheon dashboard. For details see Connect Repository to Pantheon.
- Create a new site from your new upstream with the magic site name prefix
ic-demo-2020
- Install the site in Dev and verify it’s working.
- Clone the site locally and run
composer install
The upstream has the following directory structure:
upstream/
|- composer.json
.gitignore
README.md
composer.json
pantheon.upstream.yml
- Two
composer.json
files facilitate customization of both the upstream and individual sites and enable 1-click updates, without inherent merge conflicts. - Upstream customizations live in
upstream/composer.json
. - Site-level customizations live in the root-level
composer.json
. - When a site is created, Pantheon runs
composer install
, generates a composer.lock file and commits it back to the site’s code repository. - The
build_step_demo: true
directive inpantheon.upstream.yml
enables the build step. This name is temporary and will change. - Build artifacts are stored on a git tag, not on the master branch or Multidev branch.
- Start with a local clone of your upstream repository
- Change into the
upstream
directory - Run
composer require drupal/pkg-name --no-update
. Note that--no-update
will make Composer run faster - Run
composer config version
to confirm your current version. You should see output like:1.0.0
- Run
composer config version x.y.z
to increment the version number. Replace x.y.z with something like 1.0.1. Incremeneting the version is an important step, otherwise the updated dependencies will be ignored by downstream sites. - Commit and push
- From the Code tab in the Dev or Multidev environment select Check updates
- Select Apply updates
Both of these operations require running Composer and may take several minutes.
- Clone git repo from Pantheon site dashboard
- Run
composer install
(optional) - Add new dependency locally, e.g.
composer require drupal/bootstrap
- Commit composer.json and composer.lock and push
- Pantheon will run Composer, generate build artifact, and deploy it to your Dev or Multidev
- Use
composer remove vendor/package
from a local clone of your site. - Commit and push
Pantheon automatically runs composer install
and composer update
with the following syntax:
composer update:
composer --no-cache --no-interaction --no-progress --prefer-dist update
composer install:
composer --no-cache --no-interaction --no-progress --prefer-dist install
git diff -- . ':(exclude)composer.lock'
Please submit feedback by April 17th. We will send out a survey. In the meantime, if you experience any issues, please let us know using this form.
New WordPress tempalte project: https://github.com/pantheon-upstreams/wordpress-project
Same basic instructions as Drupal.
To add a WordPress plugin you’ll want to do something like :
composer require wpackagist-plugin/akismet