Deeson: Getting started with Drupal 8 and Composer

Planet Drupal - 7 February 2017 - 3:00pm

At Deeson we are constantly looking for ways to improve the way we work, iterating on past projects to incorporate new techniques and best-practices.

We starting playing with Composer recently, as a tool for speeding up Drupal module updates. There were a few quirks, but it generally worked.

Then we discovered the Drupal Composer project, which makes it much simpler to manage Drupal core as well as modules.

This is great! We can use Composer to install and update Drupal core, modules and themes, and all in a consistent manner; anyone can run Composer and end up with the exact same set of code.

So now we can start excluding some of the off-the-shelf code from our Git repository (contrib modules, themes, and libraries.) This slims down our repositories and speeds up development for the whole team.

Combined with our approach to managing settings we’re really starting to limit the amount of custom stuff in the docroot now.

Having recently completed a site using this approach I started thinking: “Why do we even need the docroot in Git?”

So we got rid of it! One of the many benefits of working in self-managing teams!

We now have a very flat repository structure where the entire docroot is compiled during deployments. The project repository contains a CMI config directory, settings.php, modules and themes directories, and the all-important composer.json which manages everything that isn’t project-specific custom code.

Internally we use Bitbucket pipelines to manage building and deploying our projects.

Every commit triggers a pipelines build. The docroot is built, tests are run, and if all goes well, it gets pushed to the hosting platform.

We have put together a small Composer script which simply symlinks the modules, themes and settings into the docroot when running composer install. The rest of the build is vanilla composer.

Our composer.json is based on the version provided by Drupal Composer, but with a change to the post-install-cmd and post-update-cmd hooks.

"scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "pre-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "pre-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "post-install-cmd": [ "@drupal-scaffold", "DrupalProject\\composer\\DeesonScriptHandler::createRequiredFiles" ], "post-update-cmd": [ "@drupal-scaffold", "DrupalProject\\composer\\DeesonScriptHandler::createRequiredFiles" ] }

Here we have replaced the script handler plugin with our own customised version, which creates the symlinks mentioned above during composer install and composer update. We also run the Drupal Scaffold plugin on every Composer install or Composer update, to ensure that all of the extra Drupal files like index.php and update.php exist in the docroot.

Taking the Drupal docroot out of our project repositories has required a shift in the way we think about developing Drupal projects, but ultimately we believe it has streamlined and simplified our development workflows.

We have turned this approach into a Drupal 8 Quick Start template, which can be used to very quickly get up and running with Drupal 8 using a composer-based workflow. The project is available on Github. PRs welcome!

Categories: Drupal

Great Scott! Card Game Now Available

Tabletop Gaming News - 7 February 2017 - 2:00pm
For me, a Kickstarter is truly successful when you turn an idea into a finished product, send it to your backers, and then have it available for the general public to buy. In that way, Great Scott! is a truly successful Kickstarter ans they have done all of that, with the final step of being […]
Categories: Game Theory & Design

Agaric Collective: Help kick the door for new contributors to Drupal back open (and get credit for it)

Planet Drupal - 7 February 2017 - 1:15pm

After years of giving a terrible initial experience to people who want to share their first project on, the Project Applications Process Revamp is a Drupal Association key priority for the first part of 2017.

A plan for incentivizing code review of every project, not just new ones, after the project applications revamp is open for suggestions and feedback.

Which makes it excellent timing that right now you can get credit on your profile and that of your organization, boosting marketplace ranking, for reviewing the year-old backlog of project applications requesting review. The focus is on security review for these project applications, but if you want to give a thorough review and then give your thoughts on how project reviews (for any project that opts in to this quality marker) should be performed and rewarded going forward, now's the time and here's the pressing need.

Categories: Drupal

Devil N Angel Party Card Game Up On Kickstarter

Tabletop Gaming News - 7 February 2017 - 1:00pm
How well do you know your friends? Are they on the “goody two-shoes” side of things, or the “sell orphans to zoos for meat” side? I have a feeling that most of the people I know are certainly further on the “devil” side of things, just knowing them as I do. Well, if you’re unsure, […]
Categories: Game Theory & Design

Exosphere Sci-Fi Card Game Up On Kickstarter

Tabletop Gaming News - 7 February 2017 - 12:00pm
As humanity has spread out into the stars, they’ve come to realize they aren’t the only intelligent race out there. The alien Qirulian have their own space forces and they aren’t too keen on sharing the galaxy with us. As such, each side has created massive fleets, each with their own massive motherships. Now, it’s […]
Categories: Game Theory & Design

Podcast Roundup

Tabletop Gaming News - 7 February 2017 - 11:00am
We’re once more into Tuesday. The work week is well underway. Now, we just need to keep the productivity train rolling and before we know it, we’ll be back at the weekend. I know something that helps me through is some gaming podcasts. This week we have: Plaid Hat Podcast Touring Rock Band: Part 1; […]
Categories: Game Theory & Design

Arcane Wonders To Produce English Version of Viral

Tabletop Gaming News - 7 February 2017 - 10:00am
Here in the northern hemisphere, we’re well into cold and flu season. I’ve got various friends that are in various stages of being sick/getting over being sick. Sometimes it can feel like different pathogens are fighting it out for different organs within your body. Well, in Viral, that’s exactly what is happening, and soon Arcane […]
Categories: Game Theory & Design

Microsoft, Sony, HTC Vive and more are sponsoring great GDC 2017 talks!

Social/Online Games - Gamasutra - 7 February 2017 - 9:03am

Don't skip the great sponsored sessions at GDC 2017! High-profile companies like Microsoft, Sony, and HTC Vive will be there opening up about everything from the future of Xbox to 3D audio to VR dev. ...

Categories: Game Theory & Design

Gods and Goddesses 5th Edition Supplement Up On Kickstarter

Tabletop Gaming News - 7 February 2017 - 9:00am
The various fantasy realms that players may use when they play 5th Edition can have all sorts of gods and goddesses floating overhead or deep underfoot. Highly religious characters might even draw their power directly from these deities. But what if none of the current pantheons really do it for you? That’s where Gods and […]
Categories: Game Theory & Design

InternetDevels: Drupal 8 SEO Checklist module: your reliable website optimization adviser

Planet Drupal - 7 February 2017 - 8:18am

To do: improve your Drupal website’s SEO. This sounds like a pretty big task when it’s written out like that on your list! ;) Big tasks are easier to cope with when they are divided into clear, smaller steps. Great news! You can have a smart adviser, named SEO Checklist module, who can give you this list of steps and prompt you how to fulfill them.

Read more
Categories: Drupal

Ironwatch Magazine Releases Quarantine Space Combat Game

Tabletop Gaming News - 7 February 2017 - 8:00am
Ironwatch is more than just a fan-made magazine about Mantic’s products. They already have one game under their belt, so they figured that they’d make themselves another. This time it’s sci-fi instead of fantasy and space ships instead of gangs. Check out Quarantine. From the release: Set on the fringes of civilized space, Deadzone and […]
Categories: Game Theory & Design

A Systemic Approach to Game Design: Part Three - by Trent Polack Blogs - 7 February 2017 - 7:45am
Sometimes, a CEO/Technical Director/Creative Director/Rendering Dev/Engine Dev/Game Designer just needs to talk about making a holistic systems-first design process on a mech-based video game.
Categories: Game Theory & Design

Hard Sci-Fi Narration Design: Alien Encounters in Space - by Richard Nixon Blogs - 7 February 2017 - 7:45am
This article brings a hard sci-fi lore for narration design of the Daedalus video game. It brings some crisp science about the space agencies’ protocols related to alien encounters by astronauts. As well as sheds light on alien life forms themselves.
Categories: Game Theory & Design

Two Years of Roguelike Development FAQs - by Josh Ge Blogs - 7 February 2017 - 7:43am
An introduction to two full years of an ongoing discussion series aimed at sharing a multifaceted look at the numerous topics behind traditional roguelike code, design, and more.
Categories: Game Theory & Design

Nostalgia with Video Games - by Douglas Bogart Blogs - 7 February 2017 - 7:39am
How video games can be associated with memories or feelings. Why Zelda: Ocarina of Time meant more to me than just being an amazing game.
Categories: Game Theory & Design

A Look at Gacha Design in F2P Games - by Josh Bycer Blogs - 7 February 2017 - 7:38am
Today's post looks at the use of Gacha or Gashapon in F2P games, and how it impacts progression and monetization.
Categories: Game Theory & Design

Danielle's Inferno: To Hell and Back - by Sande Chen Blogs - 7 February 2017 - 7:21am
In this article, game designer Sande Chen takes a look at the game, Danielle's Inferno, from One More Story Games.
Categories: Game Theory & Design

Video Games need to stop HAVING to be fun - by Stanislav Costiuc Blogs - 7 February 2017 - 7:21am
Why we need to shift the perception of what games have to be from 'fun' to 'engaging'.
Categories: Game Theory & Design

Astroneer and the opposition between freedom and mastery - by Eloi Duclercq Blogs - 7 February 2017 - 7:20am
What can Usability bring to Astroneer ? Let's see why sometimes freedom and mastery oppose each other in games with some simple concepts that can point out strenghts and weaknesses in any game.
Categories: Game Theory & Design

Dissecting Design: The Fall of Clockwork Empires - by Josh Bycer Blogs - 7 February 2017 - 7:20am
This week's dissecting design piece takes a look at Clockwork Empires, and the issues that sadly sunk it.
Categories: Game Theory & Design


Subscribe to As If Productions aggregator