Drupal 8: Installation 101 with Composer

Having taken a step back from migrating this blog over to D8 by waiting for the full release of D8.0.0, time has pushed on!

Starting a D8 project today is a different beast entirely. Rather than download a tar ball and manually installing, it's possible (and nay advised!) to use composer to install. The best project for this currently seems to be https://github.com/drupal-composer/drupal-project

To start from scratch with a blank project using drupal-project:

composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction

Where some-dir is the directory that would be built into, and a 'web' directory within that would be the traditional web root where index.php lives.

To add a new module to the build:

cd some-dir
composer require drupal/migrate_ui:8.*

To patch a module:

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