Skip to content
No description, website, or topics provided.
PHP Shell Gherkin JavaScript
Branch: master
Clone or download
greg-1-anderson Update Composer dependencies (2019-11-13-01-53) (#211)
Loading composer repositories with package information
������������������������������������������������������                                                      ������������������������������������������������������Updating dependencies (including require-dev)
Package operations: 78 installs, 3 updates, 0 removals
  - Installing ocramius/package-versions (1.4.0): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (30%)�����������������Downloading (45%)�����������������Downloading (75%)�����������������Downloading (90%)�����������������Downloading (100%)
  - Installing squizlabs/php_codesniffer (3.5.2): Loading from cache
  - Installing dealerdirect/phpcodesniffer-composer-installer (v0.5.0): Loading from cache
  - Updating pantheon-systems/wordpress-composer (5.2.4 => 5.3): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Updating wpackagist-plugin/pantheon-advanced-page-cache (0.3.0 => 0.3.1): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (100%)
  - Updating phpoption/phpoption (1.5.0 => 1.5.2): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (25%)�����������������Downloading (70%)�����������������Downloading (85%)�����������������Downloading (100%)
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.4.1): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (50%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (70%)�����������������Downloading (75%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  - Installing symfony/dom-crawler (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (100%)
  - Installing symfony/css-selector (v3.4.34): Loading from cache
  - Installing symfony/browser-kit (v4.3.7): Loading from cache
  - Installing fabpot/goutte (v3.2.3): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (25%)�����������������Downloading (50%)�����������������Downloading (75%)�����������������Downloading (90%)�����������������Downloading (100%)
  - Installing behat/mink (v1.7.1): Loading from cache
  - Installing behat/mink-browserkit-driver (1.3.3): Loading from cache
  - Installing behat/mink-goutte-driver (v1.2.1): Loading from cache
  - Installing symfony/filesystem (v4.3.7): Loading from cache
  - Installing symfony/config (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (45%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (70%)�����������������Downloading (75%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing symfony/class-loader (v3.4.34): Loading from cache
  - Installing symfony/yaml (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (45%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (100%)
  - Installing symfony/translation-contracts (v1.1.7): Loading from cache
  - Installing symfony/translation (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (45%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (70%)�����������������Downloading (75%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing symfony/service-contracts (v1.1.8): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (100%)
  - Installing symfony/dependency-injection (v4.3.7): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing symfony/polyfill-php73 (v1.12.0): Loading from cache
  - Installing symfony/console (v4.3.7): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (45%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (70%)�����������������Downloading (75%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing behat/transliterator (v1.2.0): Loading from cache
  - Installing behat/gherkin (v4.6.0): Loading from cache
  - Installing behat/behat (v3.5.0): Loading from cache
  - Installing behat/mink-extension (2.3.1): Loading from cache
  - Installing zendframework/zend-eventmanager (3.2.1): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (35%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (80%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing zendframework/zend-code (3.4.0): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing ocramius/proxy-manager (2.2.3): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing sensiolabs/behat-page-object-extension (v2.3.0): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing paulgibbs/behat-wordpress-extension (v3.3.0): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing roave/security-advisories (dev-master 15eb463)
  - Installing wp-coding-standards/wpcs (1.2.1): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing antecedent/patchwork (2.1.11): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (75%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (100%)
  - Installing mockery/mockery (1.2.4): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (5%)����������������Downloading (10%)�����������������Downloading (15%)�����������������Downloading (20%)�����������������Downloading (25%)�����������������Downloading (30%)�����������������Downloading (35%)�����������������Downloading (40%)�����������������Downloading (45%)�����������������Downloading (50%)�����������������Downloading (55%)�����������������Downloading (60%)�����������������Downloading (65%)�����������������Downloading (70%)�����������������Downloading (75%)�����������������Downloading (80%)�����������������Downloading (85%)�����������������Downloading (90%)�����������������Downloading (95%)�����������������Downloading (100%)
  - Installing brain/monkey (2.3.1): Downloading (connecting...)���������������������������Downloading (100%)         ���������
  - Installing textalk/websocket (1.2.0): Loading from cache
  - Installing dmore/chrome-mink-driver (2.7.0): Loading from cache
  - Installing dmore/behat-chrome-extension (1.3.0): Loading from cache
  - Installing instaclick/php-webdriver (1.4.6): Loading from cache
  - Installing behat/mink-selenium2-driver (v1.3.1): Loading from cache
  - Installing genesis/behat-fail-aid (2.3.5): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/resource-operations (2.0.1): Loading from cache
  - Installing sebastian/recursion-context (3.0.0): Loading from cache
  - Installing sebastian/object-reflector (1.1.1): Loading from cache
  - Installing sebastian/object-enumerator (3.0.3): Loading from cache
  - Installing sebastian/global-state (2.0.0): Loading from cache
  - Installing sebastian/exporter (3.1.2): Loading from cache
  - Installing sebastian/environment (4.2.2): Loading from cache
  - Installing sebastian/diff (3.0.2): Loading from cache
  - Installing sebastian/comparator (3.0.2): Loading from cache
  - Installing phpunit/php-timer (2.1.2): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
  - Installing theseer/tokenizer (1.1.3): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-token-stream (3.1.1): Loading from cache
  - Installing phpunit/php-code-coverage (6.1.4): Loading from cache
  - Installing doctrine/instantiator (1.3.0): Downloading (connecting...)���������������������������Downloading (0%)           ���������������������������Downloading (45%)�����������������Downloading (100%)
  - Installing webmozart/assert (1.5.0): Loading from cache
  - Installing phpdocumentor/reflection-common (2.0.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.0.1): Loading from cache
  - Installing phpdocumentor/reflection-docblock (4.3.2): Loading from cache
  - Installing phpspec/prophecy (1.9.0): Loading from cache
  - Installing phar-io/version (2.0.1): Loading from cache
  - Installing phar-io/manifest (1.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.9.3): Loading from cache
  - Installing phpunit/phpunit (7.5.17): Loading from cache
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
symfony/browser-kit suggests installing symfony/process
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher
symfony/event-dispatcher suggests installing symfony/http-kernel
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM)
symfony/dependency-injection suggests installing symfony/finder (For using double-star glob patterns or when GLOB_BRACE portability is required)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/console suggests installing symfony/lock
symfony/console suggests installing symfony/process
symfony/console suggests installing psr/log (For using the console logger)
zendframework/zend-eventmanager suggests installing zendframework/zend-stdlib (^2.7.3 || ^3.0, to use the FilterChain feature)
zendframework/zend-code suggests installing doctrine/annotations (Doctrine\Common\Annotations >=1.0 for annotation features)
zendframework/zend-code suggests installing zendframework/zend-stdlib (Zend\Stdlib component)
ocramius/proxy-manager suggests installing ocramius/generated-hydrator (To have very fast object to array to object conversion for ghost objects)
ocramius/proxy-manager suggests installing zendframework/zend-xmlrpc (To have the XmlRpc adapter (Remote Object feature))
ocramius/proxy-manager suggests installing zendframework/zend-json (To have the JsonRpc adapter (Remote Object feature))
ocramius/proxy-manager suggests installing zendframework/zend-soap (To have the Soap adapter (Remote Object feature))
sensiolabs/behat-page-object-extension suggests installing bossa/phpspec2-expect (Allows to use PHPSpec2 matchers in Behat context files)
genesis/behat-fail-aid suggests installing genesis/sql-data-mods (Extends behat-sql-extension to provide a powerful and simple framework to manage your data modules.)
genesis/behat-fail-aid suggests installing genesis/test-routing (Simplistic routing that can extend main app routing for testing purposes.)
genesis/behat-fail-aid suggests installing genesis/db-backup-restore (Quickly backup and restore your database.)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.6.0)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating optimized autoload files
> ./scripts/composer/cleanup-composer
+ '[' -d web/wp/wp-content/mu-plugins/ ']'
+ rsync -r web/wp/wp-content/mu-plugins/pantheon web/wp/wp-content/mu-plugins/pantheon.php web/wp-content/mu-plugins/
+ '[' -f web/wp/wp-config.php ']'
+ rm web/wp/wp-config.php
+ '[' -d web/wp/wp-content ']'
+ rm -rf web/wp/wp-content
> WordPressProject\composer\ScriptHandler::createRequiredFiles
Latest commit 0abed43 Nov 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.ci Parity with `example-drops-8-composer` (#161) Aug 27, 2019
.circleci Use Terminus CLU (#203) Oct 25, 2019
scripts Use "-r" instead of "-a" in rsync Oct 2, 2019
tests Remove unused contexts Jul 5, 2019
web Remove deploy_product (#76) Feb 8, 2019
.gitignore Add BitBucket Config (#171) Sep 12, 2019
.gitlab-ci.yml Use Terminus CLU (#203) Oct 25, 2019
LICENSE Update Lando instructions in the Readme (#198) Oct 15, 2019
bitbucket-pipelines.yml Use Terminus CLU (#203) Oct 25, 2019
composer.json Allow for more recent versions of WPNPS and PAPC (#154) Aug 30, 2019
composer.lock Update Composer dependencies (2019-11-13-01-53) (#211) Nov 13, 2019
pantheon.yml Update Quicksilver Pushback to `2.x` (#165) Aug 28, 2019
wp-cli.yml Squashing int… Jul 14, 2017

Example WordPress Composer


This repository is a reference implementation and start state for a modern WordPress workflow utilizing Composer, Continuous Integration (CI), Automated Testing, and Pantheon. Even though this is a good starting point, you will need to customize and maintain the CI/testing set up for your projects.

This repository is meant to be copied one-time by the the Terminus Build Tools Plugin but can also be used as a template. It should not be cloned or forked directly.

The Terminus Build Tools plugin will scaffold a new project, including:

  • A Git repository
  • A free Pantheon sandbox site
  • Continuous Integration configuration/credential set up

For more details and instructions on creating a new project, see the Terminus Build Tools Plugin.

Important files and directories


Pantheon will serve the site from the /web subdirectory due to the configuration in pantheon.yml. This is necessary for 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 or being web accessible from Pantheon. They may still be accessible from your version control project if it is public. See the pantheon.yml documentation for details.


Even within the /web directory you may notice that other directories and files are in different places compared to a default WordPress installation. WordPress allows installing WordPress core in its own directory, which is necessary when installing WordPress with Composer.

See /web/wp-config.php for key settings, such as WP_SITEURL, which must be updated so that WordPress core functions properly in the relocated /web/wp directory. The overall layout of directories in the repo is inspired by, but doesn't exactly mirror, Bedrock.


This project uses Composer to manage third-party PHP dependencies.

The require section of composer.json should be used for any dependencies your web project needs, even those that might only be used on non-Live environments. All dependencies in require will be pushed to Pantheon.

The require-dev section should be used for dependencies that are not a part of the web application but are necesarry to build or test the project. Some example are php_codesniffer and phpunit. Dev dependencies will not be deployed to Pantheon.

If you are just browsing this repository on GitHub, you may not see some of the directories mentioned above, such as web/wp. That is because WordPress core and its plugins are installed via Composer and ignored in the .gitignore file.

A custom, Composer version of WordPress for Pantheon is used as the source for WordPress core.

Third party WordPress dependencies, such as plugins and themes, are added to the project via composer.json. The composer.lock file keeps track of the exact version of dependency. Composer installer-paths are used to ensure the WordPress dependencies are downloaded into the appropriate directory.

Non-WordPress dependencies are downloaded to the /vendor directory.


This .ci directory is where all of the scripts that run on Continuous Integration are stored. Provider specific configuration files, such as .circle/config.yml and .gitlab-ci.yml, make use of these scripts.

The scripts are organized into subdirectories of .ci according to their function: build, deploy, or test.

Build Scripts .ci/build

Steps for building an artifact suitable for deployment. Feel free to add other build scripts here, such as installing Node dependencies, depending on your needs.

  • .ci/build/php installs PHP dependencies with Composer

Build Scripts .ci/deploy

Scripts for facilitating code deployment to Pantheon.

  • .ci/deploy/pantheon/create-multidev creates a new Pantheon multidev environment for branches other than the default Git branch
  • .ci/deploy/pantheon/dev-multidev deploys the built artifact to either the Pantheon dev or a multidev environment, depending on the Git branch

Automated Test Scripts .ci/tests

Scripts that run automated tests. Feel free to add or remove scripts here depending on your testing needs.

Static Testing .ci/test/static and tests/unit Static tests analyze code without executing it. It is good at detecting syntax error but not functionality.

Visual Regression Testing .ci/test/visual-regression Visual regression testing uses a headless browser to take screenshots of web pages and compare them for visual differences.

  • .ci/test/visual-regression/run Runs BackstopJS visual regression testing.
  • .ci/test/visual-regression/backstopConfig.js The BackstopJS configuration file. Setting here will need to be updated for your project. For example, the pathsToTest variable determines the URLs to test.

Behat Testing .ci/test/behat and tests/behat Behat is an acceptance/end-to-end testing framework written in PHP. It faciliates testing the fully built WordPress site on Pantheon infrastucture. WordHat is used to help with integrating Behat and WordPress.

  • .ci/test/behat/initialize deletes any existing WordPress user from Behat testing and creates a backup of the environment to be tested
  • .ci/test/behat/run sets the BEHAT_PARAMS environment variable with dynamic information necessary for Behat and configure it to use wp-cli via Terminus, creates the necessary WordPress user, starts headless Chrome, and runs Behat
  • .ci/test/behat/cleanup restores the previously made database backup, deletes the WordPress user used for Behat testing, and saves screenshots taken by Behat
  • tests/behat/behat-pantheon.yml Behat configuration file compatible with running tests against a Pantheon site
  • tests/behat/tests/behat/features Where Behat test files, with the .feature extension, should be stored. The provided example tests will need to be replaced with project specific tests.
    • tests/behat/tests/behat/features/visit-homepage.feature A Behat test file which visits the homepage and verifies a 200 response
    • tests/behat/tests/behat/features/admin-login.feature A Behat test file which logs into the WordPress dashboard as an administrator and verifies acess to new user creation
    • tests/behat/tests/behat/features/admin-login.feature A Behat test file which logs into the WordPress dashboard as an administrator, updates the blogname and blogdescription settings, clears the Pantheon cache, visits the home page, and verifies the update blog name and description appear.

Working locally with Lando

To get started using Lando to develop locally complete these one-time steps. Please note than Lando is an independent product and is not supported by Pantheon. For further assistance please refer to the Lando documentation.

  • Install Lando, if not already installed.
  • Clone your project repository from GitHub (or GitLab or BitBucket) locally.
  • Manually create a .lando.yml file with your preferred configuration, based on the WordPress recipe.
  • Run lando start to start Lando.
    • Save the local site URL. It should be similar to https://<PROJECT_NAME>
  • Run lando composer install --no-ansi --no-interaction --optimize-autoloader --no-progress to download dependencies
  • Run lando pull --code=none to download the media files and database from Pantheon.
  • Visit the local site URL saved from above.

You should now be able to edit your site locally. The steps above do not need to be completed on subsequent starts. You can stop Lando with lando stop and start it again with lando start.

Warning: do NOT push/pull code between Lando and Pantheon directly. All code should be pushed to GitHub and deployed to Pantheon through a continuous integration service, such as CircleCI.

Composer, Terminus and wp-cli commands should be run in Lando rather than on the host machine. This is done by prefixing the desired command with lando. For example, after a change to composer.json run lando composer update rather than composer update.

You can’t perform that action at this time.