2017 © Pedro Peláez
 

project drupal-project

ThinkShout's project template for Drupal 8 projects with composer

image

thinkshout/drupal-project

ThinkShout's project template for Drupal 8 projects with composer

  • Saturday, June 23, 2018
  • by tauno
  • Repository
  • 2 Watchers
  • 4 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 543 Forks
  • 6 Open issues
  • 22 Versions
  • 8 % Grown

The README.md

You should no longer be using this repo to create a new project. Start from https://library.thinkshoutlabs.com/articles/new-drupal-site-setup instead., (*1)

:::::::::::::::::::::: Customize code below ::::::::::::::::::::::

Development set-up

This is a Drupal 9 site built using the robo taskrunner. Clone this repo directly into ~/Sites using git clone and you will be ready to begin., (*2)

This site uses PHP 7.4: make sure your local environment is running PHP 7.4 (you can run php --version to verify)., (*3)

First you need to install composer., (*4)

brew install composer, (*5)

Next add ./vendor/bin to your PATH, at the beginning of your PATH variable, if it is not already there., (*6)

Check with: echo $PATH, (*7)

Update with: export PATH=./vendor/bin:$PATH, (*8)

You can also make this change permanent by editing your ~/.zshrc file: export PATH="./vendor/bin:..., (*9)

Initial build (existing repo) -- do this once

From within your ~/Sites directory run:, (*10)

git clone git@github.com:thinkshout/new-project-name.git
cd new-project-name
composer install

Building

Running the robo configure command will read the .env.dist, cli arguments and your local environment (DEFAULT_PRESSFLOW_SETTINGS) to generate a .env file. This file will be used to set the database and other standard configuration options. If no database name is provided, the project name and the git branch name will be used. If no database name is provided, the project name and the git branch name will be used. Note the argument to pass to robo configure can include: --db-pass; --db-user; --db-name; --db-host., (*11)

robo configure
# Use an alternate DB password
robo configure --db-pass=<YOUR LOCAL DATABASE PASSWORD>
# Use an alternate DB name
robo configure --db-name=<YOUR DATABASE NAME>
# Use an alternate release/production/live branch name
robo configure --prod-branch=<YOUR BRANCH NAME>

The structure of DEFAULT_PRESSFLOW_SETTINGS if you want to set it locally is:, (*12)

DEFAULT_PRESSFLOW_SETTINGS_={"databases":{"default":{"default":{"driver":"mysql","prefix":"","database":"","username":"root","password":"root","host":"localhost","port":3306}}},"conf":{"pressflow_smart_start":true,"pantheon_binding":null,"pantheon_site_uuid":null,"pantheon_environment":"local","pantheon_tier":"local","pantheon_index_host":"localhost","pantheon_index_port":8983,"redis_client_host":"localhost","redis_client_port":6379,"redis_client_password":"","file_public_path":"sites\/default\/files","file_private_path":"sites\/default\/files\/private","file_directory_path":"site\/default\/files","file_temporary_path":"\/tmp","file_directory_temp":"\/tmp","css_gzip_compression":false,"js_gzip_compression":false,"page_compression":false},"hash_salt":"","config_directory_name":"sites\/default\/config","drupal_hash_salt":""}

Configure Drush

Drush options can be configured in the .env file. For example, to set a default uri for commands like drush uli, add this:, (*13)

DRUSH_OPTIONS_URI="https://web.new-project-name.localhost"

Drush configuration docs, (*14)

Installing -- do this regularly (after changing branches especially)

Running the robo install command will run composer install to add all required dependencies and then install the site and import the exported configuration., (*15)

robo install

Committing code -- do this regularly

Each time you start a new task, you should create a branch from production with the github ticket number and a short description of the ticket's goal in the branch:, (*16)

git checkout production
git pull
git checkout -b issue-123-short-description

As a best practice, you should now re-install, (*17)

robo install

Now work on your changes. Make sure configuration changes are saved in the codebase. If you make a config change and it doesn't seem to affect your codebase (i.e. it doesn't make any changes to the config folder), run a drush cex., (*18)

Once you're happy with your changes, create a pull request from your branch to the develop branch in github and tag the tech lead or PM in the PR. Also move your ticket into the "Tech Review" column on Zenhub. Someone will then review the PR for potential improvements or fixes, and merge, and move the ticket into the "Ready to deploy" column in Zenhub. This ticket is now ready to go out with the next release., (*19)

Testing -- do as needed

Test are run automatically on CircleCI, but can be run locally as well with:, (*20)

robo test

We're also running the Drupal Code Sniffer on our custom module and theme directories. If you submit a PR with some coding standard errors, your build will fail on circle. You can get your local site machine to run this same code sniffer by running these commands:, (*21)

composer code-sniff

If you have errors, you can run this command to fix most of those errors automagically:, (*22)

composer code-sniff-fix

This site also runs Visual Regression tests both during the PR phase on backstopjs and nightly on the develop multidev. More info about the backstopjs, including how to run locally, can be found in the .ci/test/visual-regression README., (*23)

If you need to apply patches (depending on the project being modified, a pull request is often a better solution), you can do so with the composer-patches plugin., (*24)

To add a patch to drupal module "foobar" insert the patches section in the extra section of composer.json:, (*25)

"extra": {
    "patches": {
        "drupal/foobar": {
            "Patch description": "URL to patch"
        }
    }
}

Updating Drupal Core

This project will attempt to keep all of your Drupal Core files up-to-date; the project drupal-composer/drupal-scaffold is used to ensure that your scaffold files are updated every time drupal/core is updated. If you customize any of the "scaffolding" files (commonly .htaccess), you may need to merge conflicts if any of your modified files are updated in a new release of Drupal core., (*26)

Follow the steps below to update your core files., (*27)

  1. Run composer update drupal/core "drupal/core-*" --with-all-dependencies to update Drupal Core and its dependencies.

The Versions

23/06 2018

dev-8.x-pantheon

dev-8.x-pantheon

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

09/06 2018

dev-extensions_cleanup

dev-extensions_cleanup

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

07/06 2018

dev-no-metatags

dev-no-metatags

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

13/04 2018

dev-dev-settings

dev-dev-settings

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

04/04 2018

dev-circle-env-for-config

dev-circle-env-for-config

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

27/03 2018

dev-use-regular-behat

dev-use-regular-behat

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

26/03 2018

dev-8.x-pantheon-core-8.5.0

dev-8.x-pantheon-core-8.5.0

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

13/11 2017

dev-update-to-84

dev-update-to-84

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

19/07 2017

8.x-dev

8.9999999.9999999.9999999-dev

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

19/07 2017

dev-latest-d8-drop

dev-latest-d8-drop

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

19/07 2017

dev-update-patches

dev-update-patches

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

26/06 2017

dev-circleci-2

dev-circleci-2

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

  • composer/installers ^1.2
  • drupal-composer/drupal-scaffold ^2.2
  • cweagans/composer-patches ~1.0
  • drupal/core 8.3.*
  • drush/drush ^8.1.9
  • drupal/console ~1.0
  • drupal/admin_toolbar ^1.18
  • drupal/config_installer ^1.4
  • drupal/contact_storage ^1.0-beta8
  • drupal/ctools ^3.0-alpha27
  • drupal/ds ^2.6
  • drupal/editor_advanced_link ^1.3
  • drupal/entity_reference_revisions ^1.2
  • drupal/email_registration ^1.0-rc4
  • drupal/fast_404 ^1.0-alpha2
  • drupal/field_group 1.x-dev
  • drupal/google_analytics ~2.1
  • drupal/honeypot ~1.23
  • drupal/inline_entity_form ~1.0
  • drupal/layout_plugin ^1.0-alpha23
  • drupal/linkit ^5.0-beta4
  • drupal/menu_block ~1.4
  • drupal/metatag ^1.0
  • drupal/migrate_google_sheets 1.x-dev
  • drupal/migrate_plus ^3.0-beta1
  • drupal/migrate_tools ^3.0-beta1
  • drupal/pathauto ^1.0-rc1
  • drupal/redirect ^1.0-alpha3
  • drupal/redis ^1.0-beta1
  • drupal/simple_sitemap ^2.8
  • drupal/token ^1.0-rc1
  • thinkshout/media dev-8.x-1.x

 

The Development Requires

by ThinkShout

04/06 2017

dev-issue-5-module-review

dev-issue-5-module-review

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

11/04 2017

dev-updates

dev-updates

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

  • chosen/chosen ^1.6.1
  • composer/installers ^1.0.20
  • cweagans/composer-patches ~1.0
  • drupal-composer/drupal-scaffold ^2.0.1
  • drupal/address ^1.0-rc4
  • drupal/admin_toolbar ~1.17
  • drupal/block_visibility_groups ^1.1
  • drupal/chosen ~2.1
  • drupal/config_installer 1.x-dev#128ab9096391ba7d078a6e1c180d613c6bc1176b
  • drupal/contact_storage ^1.0-beta8
  • drupal/core ~8.3.0
  • drupal/ctools ^3.0-alpha27
  • drupal/devel ^1.0-beta1
  • drupal/ds 2.x-dev
  • drupal/editor_advanced_link ^1.3
  • drupal/email_registration ^1.0-rc3
  • drupal/external_entities 1.x-dev
  • drupal/fast_404 ^1.0-alpha2
  • drupal/field_group 1.x-dev
  • drupal/flag 4.x-dev
  • drupal/google_analytics ~2.1
  • drupal/honeypot ~1.23
  • drupal/inline_entity_form ~1.0
  • drupal/layout_plugin ^1.0-alpha23
  • drupal/linkit ~4.1
  • drupal/mailchimp ^1.2
  • drupal/memcache ^2.0-alpha2
  • drupal/menu_block ~1.4
  • drupal/metatag ~1.0
  • drupal/migrate_google_sheets 1.x-dev
  • drupal/migrate_plus ^3.0-beta1
  • drupal/migrate_tools ^3.0-beta1
  • drupal/media_entity_audio 1.x-dev#61dedc218a9a023699499b73d6199a3280110e06
  • drupal/paragraphs ~1.0
  • drupal/pathauto ^1.0-beta1
  • drupal/r4032login 1.x-dev
  • drupal/redirect ^1.0-alpha2
  • drupal/redis ^1.0-beta1
  • drupal/search_api 1.x-dev
  • drupal/search_api_pantheon ^1.0-alpha2
  • drupal/search_api_solr ^1.0-beta1
  • drupal/slick ^1.0-rc2
  • drupal/simple_sitemap ^2.7
  • drupal/token ^1.0-beta2
  • drush/drush ^8.1.10
  • thinkshout/media dev-8.x-1.x
  • thinkshout/robo-drupal dev-master
  • vlucas/phpdotenv ^2.2
  • drupal/rrssb ^2.0-alpha2

 

The Development Requires

by ThinkShout

04/03 2017

dev-fixing-build

dev-fixing-build

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

  • composer/installers ^1.2
  • drupal-composer/drupal-scaffold ^2.2
  • cweagans/composer-patches ~1.0
  • drupal/console ~1.0
  • drupal/core 8.3.*
  • drush/drush ^8.1.9
  • drupal/admin_toolbar ^1.18
  • drupal/config_installer ^1.4
  • drupal/contact_storage ^1.0-beta8
  • drupal/ctools ^3.0-alpha27
  • drupal/ds ^2.6
  • drupal/editor_advanced_link ^1.3
  • drupal/entity_reference_revisions ^1.2
  • drupal/email_registration ^1.0-rc4
  • drupal/fast_404 ^1.0-alpha2
  • drupal/field_group 1.x-dev
  • drupal/google_analytics ~2.1
  • drupal/honeypot ~1.23
  • drupal/inline_entity_form ~1.0
  • drupal/layout_plugin ^1.0-alpha23
  • drupal/linkit ^5.0-beta4
  • drupal/menu_block ~1.4
  • drupal/metatag ^1.0
  • drupal/migrate_google_sheets 1.x-dev
  • drupal/migrate_plus ^3.0-beta1
  • drupal/migrate_tools ^3.0-beta1
  • drupal/pathauto ^1.0-rc1
  • drupal/redirect ^1.0-alpha3
  • drupal/redis ^1.0-beta1
  • drupal/simple_sitemap ^2.8
  • drupal/token ^1.0-rc1
  • thinkshout/media dev-8.x-1.x

 

The Development Requires

by ThinkShout

01/03 2017

dev-config_installer

dev-config_installer

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

  • composer/installers ^1.2
  • drupal-composer/drupal-scaffold ^2.2
  • cweagans/composer-patches ~1.0
  • drupal/core 8.3.*
  • drush/drush ^8.1.9
  • drupal/console ~1.0
  • drupal/admin_toolbar ^1.18
  • drupal/config_installer ^1.4
  • drupal/contact_storage ^1.0-beta8
  • drupal/ctools ^3.0-alpha27
  • drupal/ds ^2.6
  • drupal/editor_advanced_link ^1.3
  • drupal/entity_reference_revisions ^1.2
  • drupal/email_registration ^1.0-rc4
  • drupal/fast_404 ^1.0-alpha2
  • drupal/field_group 1.x-dev
  • drupal/google_analytics ~2.1
  • drupal/honeypot ~1.23
  • drupal/inline_entity_form ~1.0
  • drupal/layout_plugin ^1.0-alpha23
  • drupal/linkit ^5.0-beta4
  • drupal/menu_block ~1.4
  • drupal/metatag ^1.0
  • drupal/migrate_google_sheets 1.x-dev
  • drupal/migrate_plus ^3.0-beta1
  • drupal/migrate_tools ^3.0-beta1
  • drupal/pathauto ^1.0-rc1
  • drupal/redirect ^1.0-alpha3
  • drupal/redis ^1.0-beta1
  • drupal/simple_sitemap ^2.8
  • drupal/token ^1.0-rc1
  • thinkshout/media dev-8.x-1.x

 

The Development Requires

by ThinkShout

09/02 2017

dev-base-install-with-media

dev-base-install-with-media

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

  • chosen/chosen 1.6.1
  • composer/installers ^1.0.20
  • cweagans/composer-patches ~1.0
  • drupal-composer/drupal-scaffold ^2.0.1
  • drupal/admin_toolbar ~1.17
  • drupal/chosen 2.1
  • drupal/config_installer 1.x-dev
  • drupal/contact_storage 1.0-beta8
  • drupal/core ^8.2.1
  • drupal/ctools 3.0-alpha27
  • drupal/devel ^1.0-beta1
  • drupal/ds 2.x-dev
  • drupal/editor_advanced_link ^1.3
  • drupal/email_registration 1.0-rc3
  • drupal/entity_browser ^1.0-beta2
  • drupal/entity_embed 1.0-beta2
  • drupal/fast_404 1.0-alpha2
  • drupal/field_group 1.x-dev
  • drupal/google_analytics ~2.1
  • drupal/honeypot 1.23
  • drupal/inline_entity_form ~1.0
  • drupal/layout_plugin 1.0-alpha23
  • drupal/linkit 4.1
  • drupal/memcache 2.0-alpha2
  • drupal/metatag 1.0-beta11
  • drupal/migrate_google_sheets 1.x-dev
  • drupal/migrate_plus ^3.0-beta1
  • drupal/migrate_tools ^3.0-beta1
  • drupal/paragraphs 1.0
  • drupal/pathauto ~1.0-beta1
  • drupal/r4032login 1.x-dev
  • drupal/redirect ^1.0-alpha2
  • drupal/redis 1.0-alpha1
  • drupal/search_api 1.x-dev
  • drupal/search_api_pantheon ~1.0-alpha2
  • drupal/search_api_solr ~1.0-beta1
  • drupal/simple_sitemap ^2.7
  • drupal/token ~1.0-beta2
  • drush/drush ^8.1.7
  • thinkshout/media dev-8.x-1.x
  • thinkshout/robo-drupal dev-master
  • vlucas/phpdotenv ^2.2

 

The Development Requires

by ThinkShout

29/12 2016

dev-latest-changes

dev-latest-changes

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

20/08 2016

dev-use-behat-profiles

dev-use-behat-profiles

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

17/08 2016

dev-use-drupal-facade

dev-use-drupal-facade

ThinkShout's project template for Drupal 8 projects with composer

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by ThinkShout

21/03 2016

7.x-dev

7.9999999.9999999.9999999-dev

Composer template for Drupal projects

  Sources   Download

The Requires