Install drops-8 with Composer on Pantheon.
Clone or download
greg-1-anderson Update Composer dependencies (2018-12-05-18-19) (#177)
```
Loading composer repositories with package information
Updating dependencies
Package operations: 1 install, 25 updates, 0 removals
  - Updating symfony/yaml (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/var-dumper (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/finder (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/event-dispatcher (v3.4.18 => v3.4.19): Loading from cache
  - Updating psr/log (1.0.2 => 1.1.0): Loading from cache
  - Updating symfony/debug (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/console (v3.4.18 => v3.4.19): Loading from cache
  - Updating consolidation/annotated-command (2.9.1 => 2.10.0): Loading from cache
  - Updating drush/drush (8.1.17 => 8.1.18): Loading from cache
  - Updating masterminds/html5 (2.3.1 => 2.4.0): Loading from cache
  - Updating symfony/class-loader (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/http-foundation (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/http-kernel (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/routing (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/serializer (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/translation (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/validator (v3.4.18 => v3.4.19): Loading from cache
  - Installing ralouphie/getallheaders (2.0.5): Downloading (100%)
  - Updating guzzlehttp/psr7 (1.4.2 => 1.5.2): Downloading (100%)
  - Updating symfony/filesystem (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/config (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/css-selector (v2.8.47 => v2.8.48): Loading from cache
  - Updating symfony/dependency-injection (v3.4.18 => v3.4.19): Loading from cache
  - Updating symfony/process (v3.4.18 => v3.4.19): Loading from cache
  - Updating drupal/core (8.6.3 => 8.6.4): Downloading (100%)
  - Updating symfony/dom-crawler (v3.4.18 => v3.4.19): Loading from cache
Writing lock file
Generating optimized autoload files
> DrupalProject\composer\ScriptHandler::createRequiredFiles
> find .circleci/scripts/pantheon/ -type f | xargs chmod 755
> find tests/scripts/ -type f | xargs chmod 755

Symfony Security Check Report
=============================

 // Checked file: /private/var/folders/46/rc22cmtx3g54h2jw6w5xj68c0000gq/T/composer-update-344f186/composer.lock

 [OK] No packages have known vulnerabilities.

 ! [NOTE] This checker can only detect vulnerabilities that are referenced in the SensioLabs security
 !        advisories database. Execute this command regularly to check the newly discovered vulnerabilities.

```
1
Latest commit 0cb0e98 Dec 6, 2018

README.md

Example Drops 8 Composer

CircleCI Pantheon example-drops-8-composer Dev Site example-drops-8-composer

This repository is a start state for a Composer-based Drupal workflow with Pantheon. It is meant to be copied by the the Terminus Build Tools Plugin which will set up for you a brand new

  • GitHub repo
  • Free Pantheon sandbox site
  • A CircleCI configuration to run tests and push from the source repo (GitHub) to Pantheon.

For more background information on this style of workflow, see the Pantheon documentation.

Installation

Prerequisites

Before running the terminus build:project:create command, make sure you have all of the prerequisites:

You may find it easier to export the GitHub and CircleCI tokens as variables on your command line where the Build Tools Plugin can detect them automatically:

export GITHUB_TOKEN=[REDACTED]
export CIRCLE_TOKEN=[REDACTED]

One command setup:

Once you have all of the prerequisites in place, you can create your copy of this repo with one command:

terminus build:project:create pantheon-systems/example-drops-8-composer my-new-site --team="Agency Org Name"

The parameters shown here are:

  • The name of the source repo, pantheon-systems/example-drops-8-composer. If you are interest in other source repos like WordPress, see the Terminus Build Tools Plugin.
  • The machine name to be used by both the soon-to-be-created Pantheon site and GitHub repo. Change my-new-site to something meaningful for you.
  • The --team flag is optional and refers to a Pantheon organization. Pantheon organizations are often web development agencies or Universities. Setting this parameter causes the newly created site to go within the given organization. Run the Terminus command terminus org:list to see the organizations you are a member of. There might not be any.

Important files and directories

/web

Pantheon will serve the site from the /web subdirectory due to the configuration in pantheon.yml, facilitating a Composer based workflow. Having your website in this subdirectory also allows for tests, scripts, and other files related to your project to be stored in your repo without polluting your web document root.

/config

One of the directories moved to the git root is /config. This directory holds Drupal's .yml configuration files. In more traditional repo structure these files would live at /sites/default/config/. Thanks to this line in settings.php, the config is moved entirely outside of the web root.

composer.json

If you are just browsing this repository on GitHub, you may notice that the files of Drupal core itself are not included in this repo. That is because Drupal core and contrib modules are installed via Composer and ignored in the .gitignore file. Specific contrib modules are added to the project via composer.json and composer.lock keeps track of the exact version of each modules (or other dependency). Modules, and themes are placed in the correct directories thanks to the "installer-paths" section of composer.json. composer.json also includes instructions for drupal-scaffold which takes care of placing some individual files in the correct places like settings.pantheon.php.

Behat tests

So that CircleCI will have some test to run, this repository includes a configuration of Behat tests. You can add your own .feature files within /tests/features/.

Updating your site

When using this repository to manage your Drupal site, you will no longer use the Pantheon dashboard to update your Drupal version. Instead, you will manage your updates using Composer. Ensure your site is in Git mode, clone it locally, and then run composer commands from there. Commit and push your files back up to Pantheon as usual.