Planet Drupal

Syndicate content - aggregated feeds in category Planet Drupal
Updated: 13 hours 39 min ago

Palantir: The Secret Sauce, Ep. 34: Remote Teams

Mon, 2016-10-17 15:53
The Secret Sauce, Ep. 34: Remote Teams The Secret Sauce brandt Mon, 10/17/2016 - 14:53 Scott DiPerna and Lauren Byrwa with Allison Manley Oct 18, 2016

We want to make your project a success.

Let's Chat.

Strategies for making remote collaboration successful on web development projects.

With the advancement of technology, there are infinite ways and opportunities to work remotely, no matter where you are. In this week’s episode of The Secret Sauce, we share some strategies for making remote work - well, work.

iTunes | RSS Feed | Download| Transcript

We want to make your project a success.

Let's Chat. Transcript

Allison Manley [AM]: Hello and welcome to The Secret Sauce, a short podcast by, that offers a little bit of advice to help your business run better.

I’m Allison Manley, Sales and Marketing Manager here, and today’s advice comes from Scott DiPerna and Lauren Byrwa. In this global economy, there are infinite ways and opportunities to work remotely, no matter where you are. Scott and Lauren are going to share some strategies on how to collaborate successfully across great distances and time zones.

Scott DiPerna [SD]: Hi, I’m Scott DiPerna.

Lauren Byrwa [LB]: Hi, I’m Lauren Byrwa.

SD: Recently we worked with a client in California who had hired a content strategy team in New York City. Lauren, with our development team, was in Chicago, and I, as the Project Manager, was in South Africa. We had lots of interesting new challenges in this project, and like we do in most projects, we learned a lot about working well with our clients, our collaborators, and with each other.

LB: So, Scott, what was it like trying to work from South Africa, being seven to nine hours ahead of everyone else?

SD: Well, it wasn’t that different from working remotely in Richmond, Virginia. I do shift my working hours to the evening to overlap with the team in the States. But just as I did in Virginia, we do all of our meetings on a video chat regardless of where we are. It’s part of our process especially with our clients being all over the country, so that part wasn’t really different. But we did do a few things differently in this project — not so much because we were all in different places, but because we had multiple vendors and teams collaborating together. Do you want to talk about some of the adjustments that we made in terms of meetings?

LB: Yeah, so we met with the content strategy team weekly. We met with our product owner three times a week. We met with our full team, our full team of stakeholders, weekly. And in addition to that we still had all our usual agile ceremonies like scrum, demos, retrospectives, that we always do on projects. These meetings especially were productive because we had all of the strategic functionality up front, and we could ask specific implementation-level questions early on, and we could vet them both with the product owner specifically, with the strategists specifically, and with the entire group. But I think there are a few other ways that the thorough strategy helped. Do you want to talk about those?

SD: Sure. I think there were two parts specifically that were really helpful. Doing a lot of the strategic planning up front meant that the client was a lot more conversant in the details of the product that we were planning to build for them. We just had a lot more conversations with them up-front and could talk in detail. The other piece was having much of the functionality visually documented in wireframes that the strategy team kept current with changes in the functionality meant that the client always had a “picture” in their minds of what it was that we were talking about. When everyone is working remotely from one another, these kinds of visuals help conversations over video chat be infinitely more productive, which I think is something we see in all of our projects. So all of this planning had a really helpful impact on your ability to estimate the work up front, too. Do you want to talk a bit about that?

LB: Because we had the complete and canonical wireframes from the strategists we were able to fairly precisely estimate all of the functionality that they had scoped out in those wireframes. This meant that even before we started development, we were able to work with our product owner to go over in detail the scope of work we anticipated to be able to complete within their budget. We had many conversations with him about what features would be most important for their users, and were able to prioritize accordingly. It meant that we could talk about the specifics of our implementation in really granular detail internally, both with the strategists, both with the product owner. We collaboratively evaluated if there were options to streamline our implementation, and we were able to address specific questions that usually would not come up until user acceptance testing. All of these conversations resulted in updates to both the canonical wireframes that the strategists were maintaining, as well as the implementation documentation that we were maintaining on our end. And it meant that the picture that the strategists had, that they kept, that the clients had in their head, stayed the same. And it was all reflected in what they could expect to be spending on the implementation for development.

SD: Right. And since we were documenting those functional changes in the wireframes, we could capture that quickly and review it with the client in the middle of a sprint. And speaking of that sort of adjustment in the middle of a sprint, you started doing mini-demos of work in progress, demoing that to the product owner. Can you talk a little bit about why you shifted in that direction?

LB: Yeah, so because we already had all of these meetings set up, and because we already had those canonical wireframes that showed all of the functionality in the picture, we wanted to make sure that they could see the picture of their website, the implementation, as quickly as possible too. So when we had specific implementation questions about things that were spec-ed out in the wireframes, we would demo it for the client. And they could vet it, both for the client and the strategists, and come back to that . . . is this the best choice for the user. It meant that all of those questions of, is this the best route to go down, does this work the way that I anticipated it to, were answered not even before user acceptance testing — they were answered even before the demo. So we could pivot our strategy accordingly, and we did on a lot of issues.

SD: So given all of these constraints that we faced on the project, where we had a client in one part of the States, a content strategy team in another part of the States, even our own internal strategy team split up across continents, and a pretty sizeable project with some interesting technical projects to solve — what were some of the biggest take-aways that you had from that project?

LB: I think the number one thing that I took away from that project was that we can solve every problem together, and that we can come to a better conclusion when we come to it together. The collaborative effort with the strategy team to focus conversations through the lens of the primary audience really helped us anchor our strategy and our implementation in that primary user, and not in some of the other things that often derail projects. We had complete and thorough documentation both on the strategy level and on the implementation, and both of those were transparent to everyone accessing the project. And I think that really helped us to streamline the entire project.

SD: I think for me one of the other things is that we were able to form really good relationships both with the client and with the third-party team we were collaborating with. And that made all of our conversations run more smoothly. We were able to have fun even in the difficult phases of the project, and even going through tough negotiations around scope or functionality or budgets or stuff like that — having those good relationships and having that good level of communication with them just made the whole process go more smoothly.

AM: That’s the end of this week’s Secret Sauce. For more great tips, please check out our website at You can also follow us on twitter at @palantir. Have a great day!

Categories: FLOSS Project Planets

Pantheon Blog: Using Composer with a Relocated Document Root on Pantheon

Mon, 2016-10-17 15:52
Composer is the de-facto dependency manager for PHP; it is therefore no surprise that it is becoming more common for Drupal modules to use Composer to include the external libraries it needs to function. This trend has rather strong implications for site builders, as once a site uses at least one module that uses Composer, then it becomes necessary to also use Composer to manage your site.  
Categories: FLOSS Project Planets

Drupal Association News: Public Board Meeting Update

Mon, 2016-10-17 15:04

On September 28, 2016, The Drupal Association board hosted a public board meeting during DrupalCon Dublin. It was wonderful to connect with the community in person to share updates and answer questions.

Over the last few months, we provided an update on The Association’s current focus followed by department-specific updates. This board meeting shared highlights of specific areas including:

  • DrupalCon New Orleans
  • front page improvements
  • Membership campaigns

This public board packet provides links to those presentations along with updates on other programs. It also includes a dashboard of all our current work. You can also watch the video recording here.

We love hearing from the community. Contact us anytime to share your feedback or ask questions via email or @drupalassoc.

The next public board meeting will be on 21 November, 2016 at 7:00 am PT / 15:00 GMT. You can register for the meeting here.


Categories: FLOSS Project Planets

Palantir:'s Guide to Digital Governance: Intended Use

Mon, 2016-10-17 13:06's Guide to Digital Governance: Intended Use's Guide to Digital Governance brandt Mon, 10/17/2016 - 12:06 Scott DiPerna Oct 17, 2016

This is the fourth installment of’s Guide to Digital Governance, a comprehensive guide intended to help get you started when developing a governance plan for your institution’s digital communications.

In this post we will cover...
  • Why it's important to define intended use of properties
  • A couple of different ways intended use might be defined
  • Some questions to consider for explaining your intended use policy

We want to make your project a success.

Let's Chat.

Once we have established ownership for all of the content within our web properties, it may be helpful to define the intended use of those properties next.

This may seem obvious and unnecessary to state, but in my experience it has been important to define the intended use of the web property that is currently being described. This ensures that everyone is on the same page and understands a common set of goals for the property.

Public-facing websites are commonly intended for the use of communicating information to audiences outside of an organization, which is why they are public and usually distinguished from private, inward-facing sites, such as an intranet, which is intended for the purpose of communicating information to internal audiences within an organization. Not everyone understands this, so it is important to establish the reasoning behind the existence of the property so as not to confuse it with the purpose of another property.

Occasionally, the intended use of a property will be defined in part by the negative, or by that which it is NOT intended to be used. For example, it may be useful to state that no part of a public site should be used for personal content, especially if alternative resources exist explicitly for that purpose.

Here is an example of how intended use is sometimes defined by the negative:

"Academic Department websites are intended for the use of communicating information about the department, its faculty, degree requirements, course offerings, policies, etc. Academic Department websites are not intended for hosting websites of individual faculty, websites based on grant funding, research projects, or specific course-related materials, or for private (i.e. password-protected) websites or applications."

The negative in this example addresses some misperceptions about the intended use of a site about a department by listing some common misuses of the site previously.

Here are some questions to consider for explaining your own intended use policy:

  • What is the primary purpose of the property or Website?
  • What are the secondary and tertiary purposes, if they exist? 
  • Are there any activities or content which occasionally find their way onto this property which should live elsewhere, and thus explicitly be listed as not intended for this property?
  • What are the “grey areas” or things which are unclear where they belong?
  • Is there a process for dealing with grey areas?
  • Who would help determine that process if it doesn’t exist? Intended use can be a controversial subject for many organizations, so think carefully and cautiously throughout this exercise.

Intended use can be a controversial subject for many organizations, so think carefully and cautiously throughout this exercise. I recommended gathering input from a broad range of representative stakeholders to discuss some of the stickier points before defining and presenting a plan that may draw criticism when reviewed by the larger organization.

As with most things, intended use should be based in reason and make sense to most people. That being said, there may be occasions in which some level of compromise is required in order to accommodate content that doesn’t have a home otherwise. This is typically okay in small amounts and for brief time-periods, until alternative solutions can be found.


This post is part of a larger series of posts, which make up a Guide to Digital Governance Planning. The sections follow a specific order intended to help you start at a high-level of thinking and then focus on greater and greater levels of detail. The sections of the guide are as follows:

  1. Starting at the 10,000ft View – Define the digital ecosystem your governance planning will encompass.
  2. Properties and Platforms – Define all the sites, applications and tools that live in your digital ecosystem.
  3. Ownership – Consider who ultimately owns and is responsible for each site, application and tool.
  4. Intended Use – Establish the fundamental purpose for the use of each site, application and tool.
  5. Roles and Permissions – Define who should be able to do what in each system.
  6. Content – Understand how ownership and permissions should apply to content.
  7. Organization – Establish how the content in your digital properties should be organized and structured.
  8. URLs – Define how URL patterns should be structured in your websites.
  9. Design – Determine who owns and is responsible for the many aspects design plays in digital communications and properties.
  10. Personal Websites – Consider the relationship your organization should have with personal websites of members of your organization.
  11. Private Websites, Intranets and Portals – Determine the policies that should govern site which are not available to the public.
  12. Web-Based Applications – Consider use and ownership of web-based tools and applications.
  13. E-Commerce – Determine the role of e-commerce in your website.
  14. Broadcast Email – Establish guidelines for the use of broadcast email to constituents and customers.
  15. Social Media – Set standards for the establishment and use of social media tools within the organization.
  16. Digital Communications Governance – Keep the guidelines you create updated and relevant.

Stay connected with the latest news on web strategy, design, and development.

Sign up for our newsletter.
Categories: FLOSS Project Planets

Drupal Association News: Association members cultivate community with grants

Mon, 2016-10-17 13:04

It isn't easy to build a strong community. Many event organizers work to bring people together for Drupal. Community Cultivation Grants are one tool to make the work a little easier. With a grant, you can strengthen the local community. You can help drive the adoption of Drupal.

Drupal Association members fund these grants. A few grant recipients have told us their stories. I'd like to share more about what has happened since the grants were awarded.

Andrey from DrupalCamp Moscow The DrupalCamp Moscow 2014 organizers have connected with the organizers of other camps — DrupalCamp Siberia (in Novosibirsk in 2015) and DrupalCamp Krasnodar (in September 2016). They've shared experiences to inspire the communities in these other Russian cities.

Andrey tells us, "In Moscow, we don't have any large companies which offer Drupal services. Our community organizes all the local events. After DrupalCamp Moscow 2014, we've held more events than ever before. 6 meetups, 22 small meetings, a D8 Release Party and one Drupal burgers event have happened. We've had Drupal specialists from other cities of Russia and the world come to visit. New participants are always welcome here and we are seeing more and more of them." Ricardo from Drupal Mexico City

Ricardo tells us, "We held another Drupal camp in Mexico City in 2015 with 250 attendees. In 2016, our dear fellows from Axai did the same in Guadalajara.

This year, we went off the island, just like Drupal 8 has, and we organized an even broader PHP event. It was amazing. The response was fantastic, we broke all our attendance records. We've grown the PHP Mexico community & PHP Way meetups and now have 1,000 members. Our attendees could become new Drupalists. But we expect to see new Drupalists come from the Symfony world.

We decided to have only one Drupal event in Mexico per year. In 2016, it was held in Guadalajara. If nobody else wants to organize an event at 2017, we'll probably do it again. If we organize the next Drupal event, it will probably happen together with a PHP event once again. Ultimately, community growth should be in concordance with demand growth. This hasn't happen here in CDMX, we are hopeful that it will."

Martha from Drupal Guadalajara

From Martha: "We attended DrupalCamp Costa Rica in September and continue being connected to the Drupal Latino Community. After Guadalajara camp, there is more local Drupal awareness. Our company has received training and quote requests since the camp."

Community Cultivation Grants do more than build connections in our community and grow our contributors. They also to help drive the adoption of Drupal.

Ivo from Drupal Roadshow Bulgaria

Ivo says, "Since the roadshow, there we've met our goal of running a Drupal Academy. We now run the biggest Drupal Course at Software University in Bulgaria. We have more than 1200 registered students. Our activities were featured in the Bulgarian National Television.
We are also proud of another result of the roadshow. One of the larger Drupal shops in Bulgaria opened their second office in a small town. We introduced Drupal there."

Tom from DrupalCamp Vietnam (2016)

Tom tells us, "I'm an entrepreneur and angel investor. Helping people become prepared for the digital enterprise is fulfilling to me. I want to spend more time coaching young developers with IT career decisions. To help get them learn how to use Drupal as a versatile data/content modeling tool. Which can act as a key platform to integrate with many other FOSS too. Including MERN stack, Hadoop, Spark, Docker, Openstack, etc.

Technology is always changing. What sticks is the experience you gain by contributing to an open-source community such as Drupal."

We're excited to see grant recipients building relationships in our community. You can connect with community and make more grants possible by joining the Drupal Association today.

Personal blog tags: Membershipcommunity cultivation grants
Categories: FLOSS Project Planets

Xeno Media: Xeno Media's Jim Birch presents at Bay Area Drupal Camp 2016

Mon, 2016-10-17 10:47

Our Digital Strategist, Jim Birch, will be presenting on Holistic SEO and Drupal at BADCamp X, the 10th annual Bay Area Drupal Camp being held between October 20th - 23rd at the University of California in Berkeley.  This will be the second year in a row in which Jim will be participating in the event.

BADCamp is the largest regional conference dedicated to Drupal and open-source software with over 1600 attendees descending on the UC Berkeley campus for four days of presentations, trainings, summits, and sprints.

In 2015, Jim presented Optimizing Drupal 7 HTML Markup to a crowded room of Frontend developers and Site builders.

Watching @thejimbirch give a great talk on Optimizing Drupal Markup @BADCamp!

— Wes Ruvalcaba (@wesruv) October 24, 2015

This year, Jim's focus is the modern state of Search Engine Optimization: How we at Xeno Media define best practices for technical SEO using Drupal and ideas on how to guide and empower clients to create the best content to achieve their goals.

This presentation will review:

  • What Holistic SEO is, and some examples.
  • The most common search engine ranking factors, and how to keep up to date.
  • An overview of Content strategy and how it can guide development.
  • An overview of technical SEO best practices in Drupal.

The presentation is:

In addition, Jim will be giving a lightning talk on Friday at the Frontend summit. Summits are more conversational in nature, and this event will focus on the best practices, and technologies used in Drupal development with presentations and panel discussions. 

Jim will be showcasing our soon-to-be-released Drupal contrib module Bootstrap Paragraphs.  The module is a suite of Paragraph bundles made with the Bootstrap framework's markup.

Categories: FLOSS Project Planets

Palantir: Addressing Accessibility for the Web

Mon, 2016-10-17 10:20
Addressing Accessibility for the Web brandt Mon, 10/17/2016 - 09:20 Michellanne Li Oct 17, 2016

Making sure your website is accessible requires more than just fulfilling a checklist of best practices.

In this post we will cover...
  • How you should be thinking about accessibility

  • How to bake accessibility into your process

  • Some tips and tricks for creating accessible websites

We want to make your project a success.

Let's Chat.

The Americans with Disabilities Act was a landmark civil rights legislation that tore down barriers preventing individuals with disabilities from fully participating in society. This bill covered important aspects of life in the 1990s, such as public transportation and employment. A decade and a half later these things are still important, but technologies have emerged that raise new questions about how they can be made accessible for all users.

This year, I had the privilege of attending the 2016 Accessibility Summit, where presenters from organizations such as the W3 Consortium, Adobe, and WebAIM talked about ways in which we can make the web more accessible to users with disabilities such as low vision, blindness, deafness, and limited dexterity.

One of my biggest takeaways was that I had been thinking about accessibility all wrong. Initially, I saw accessibility guidelines as a checklist. Although lists are published by thought leaders such as Google (, it’s entirely possible for a website to adhere to accessibility criteria without effectively meeting the needs of disabled users.

While checklists are useful, they lack a human element. It helps to view accessibility as a holistic approach to design, development, and content that, at its core, relies on empathy and understanding of a wide range of user experiences.

Accessibility issues are ultimately user experience issues.

How do you bake accessibility into your process? Below are some ideas of how accessibility may become an inherent part of creating a website:

Create personas for disabled users to address accessibility. Some examples might be:

  • A person with low vision or blindness
  • A person who has recently suffered a stroke
  • A person who is positioned in the glare of the sun

The World Wide Web Consortium has created a diverse set of personas representing disabled users, which are available on their website ( There are also solutions provided for common problems these users might face on the web.

Create tickets based on disabled user personas. These tickets should have specific quantifiable success criteria, such as: “a person with vision impairment can fill out this form.” This is a great platform to demonstrate to clients how accessibility is being achieved.

From the onset, design with accessibility in mind. Designers should familiarize themselves with accessibility guidelines and incorporate them into their work starting with the earliest concepts.

For instance, whenever I’m working with text, I run potential colors for both the text and the background through a contrast checker (such as this one: Contrast checkers confirm whether the combined text color and background color will be readable. Such measures preempt the need to rethink the design later in the process, thus saving time and avoiding the pitfalls of presenting a client with ideas that cannot be realized.

When designing the UI, aim for fewer steps to task completion. By decreasing the number of keystrokes, steps, and time required to complete tasks, we can make websites more accessible for everyone.

A task that is mildly annoying to complete for an abled user can be prohibitively time-consuming and frustrating for a disabled user. All users can benefit from the simplification of tasks, but disabled users will be especially impacted.

During development, take advantage of the wide range of auditing tools available to check whether your site adheres to accessibility guidelines. Some popular tools include:

Navigate and complete tasks on your website with the tools available to disabled users. This doesn’t replace user testing, but it can provide some useful insights. Here are some ideas:

  • Try using a screen reader, such as Chrome Vox. This helps you confirm whether your interactive elements are labeled clearly.
  • Change your iPhone’s accessibility settings and practice using your website with voiceover. Go into “Settings > General > Accessibility.”
  • Try using your keyboard only.

You can implement these techniques when demoing websites to clients to help them understand how different users access websites.

Recruit individuals with disabilities to participate in usability testing. This is the best way to confirm whether a website truly is accessible. Remember that accessibility guidelines are just the starting point. A site that checks off all the boxes may still have roadblocks for disabled users.

Disability rights lawyer, Lainey Feingold, provides on her website a list of nonprofits that offer usability testing by disabled individuals (

Additionally, here are some tips and tricks for creating accessible websites. 
  • Use flyingfocus.js ( to add a sense of movement to the :focus state of interactive elements. This enhances the user experience of tabbing through a web page. Check out some examples here:
  • Sighted users who tab through a website also benefit from the addition of skip links. (However, non-sighted keyboard users do not use skip links because screen readers have ways of getting around repetitive content.) What’s a skip link? It is a link at the top of the page that the user can select to “jump” to the main content. This saves time that would otherwise be spent tabbing through the site header on every page. A skip link can be styled so that it is hidden until a user tabs over it. Adding a css transition so the hidden link is visible for a fraction of a second longer will ensure that the user doesn’t miss it.
  • Aria roles are useful, but employ them sparingly. Overuse of aria roles can actually diminish the accessibility of a website.
  • It’s dangerous to make assumptions about how users are interacting with and viewing your website. For instance, desktop users who zoom in on websites will wind up activating the mobile view. And some mobile users navigate with a keyboard.
  • Rather than “Read More” links, be specific: “Read more about ---.” This is important for users with screen readers who are unable to see the association between the “read more” link and the content it references. You can visually hide “---” so that only screen readers will detect it.
  • Blocks of text should be no more than 80 characters or glyphs wide (40 if CJK). 45-75 characters is considered ideal.
  • Avoid using screen reader detection. Visually impaired individuals do not want to feel like they are being treated differently or tracked.
  • Avoid using tabindex with positive values. Instead, structure your markup for logical and intuitive navigation.
  • Use tabindex(-1) to set focus on things that aren’t natively focusable.

Stay connected with the latest news on web strategy, design, and development.

Sign up for our newsletter.
Categories: FLOSS Project Planets

Amazee Labs: Project Managers matter, and other self-actualizing thoughts

Mon, 2016-10-17 09:59
Project Managers matter, and other self-actualizing thoughts

I had a wild aha moment last week while I was away at my first PM conference. I work in web and I'm a project manager. I thought I “got it”. Except, I guess I didn’t.

It wasn’t until I was surrounded in a ballroom of my peers, hearing Brett Harned's Army of Awesome rallying cry, seeing the words blown up on a screen that I realized, Oh my god. I'm not a glorified secretary.

I may not be the one coding, designing, or deploying a product, but what I do matters. It makes a difference. I'm part of my team in a tangible way. And a there are others like me

Stephanie El-Hajj Mon, 10/17/2016 - 15:59

Similar to DrupalCon, the Digital PM Summit is a conference that travels around the US from city to city each year. This year it landed in San Antonio, a hop-skip and two-hour drive from my home in Austin, Texas.  

As a seasoned event manager, I tend to have a pretty agnostic relationship towards attending conferences. Speakers present their topics. Attendees politely paid attention, or didn’t. The draw of a glowing macbook is hard competition against topics which don't directly apply to me and the work I do.

But this time was different. For once, I not only understood the scheduled topics, I wanted to attend them. For once, I had trouble choosing. I was even excited to talk to strangers, not something that comes easy to me, because we already have something in common.

My world was rocked.

Over the course of three days, speakers and attendees shared tools, processes, tips, and horror stories of life in the PM trenches. It was quite cathartic and therapeutic to be surrounded by people who understand and empathize, because they live it, too.

Talking to other digital project managers this weekend was invaluable, and something I didn’t realize I was missing out on. Turns out, I wasn't the only one. While a handful of the attendees were newbies, like me, many others remember their first Digital PM Summit fondly. All these same warm-fuzzies I was feeling was part of the reason they come back.

Here’s a few of my biggest takeaways, many of which were reiterated by different people, in various situations, throughout the course of the event:

1. The struggles and challenges I face as a PM are normal. I'm not on actually fire, and nobody has died.

2. Early and honest communication helps solve and prevent problems.

3. Problems aren’t always external. Internal scope creep is real. 

4. Nobody's figured out how to virtually replicate an in-person whiteboard brainstorming session.

5. Project Managers should carve out time for themselves and often don’t. 

6. The importance of empathy, building relationships, and treating people like humans. 

Side note: If you haven't seen Derek's DrupalCon Dublin session on perfectionism or read Brené Brown's work on vulnerability and you work with people, do yourself a favor, and get caught up. 

As you can probably gather, DPM was quite a touchy-feely event, something that's not the most comfortable thing in the world for me. I think that twinge of discomfort helped me appreciate the honesty and open dialogue even more. For me, this event was professionally and personally beneficial and I've come home better prepared to work with my team, to engage with my clients, and to better appreciate and respect the work that I do. That we all do. 

If you're a PM, and you haven't heard this at all or lately, you are awesome. Your work matters. You're here because you're needed.

Categories: FLOSS Project Planets

Amazee Labs: Drupal Composer recipes

Mon, 2016-10-17 06:49
Drupal Composer recipes

In this post we are going to share some Composer recipes we collected while working with Drupal projects created from the Drupal Composer template. Also, we will take a look on how to convert an existing Drupal project to a Composer project.

Alex Tkachev Mon, 10/17/2016 - 12:49

If you still don't use Composer for managing Drupal projects, you should start doing this right now! The Drupal Composer template will help you to set things up. It's really easy to setup a new project.

If you’re still not convinced, check out the benefits of the Drupal Composer workflow:

  • No need to store contrib code (and the core!) in your version control system.
  • A single package management tool for everything: Drupal core, contrib modules, JS libraries, your own shared modules, etc.
  • Patching of core and modules is easier than ever.
  • It's way simpler than git submodules.

(All recipes consider Drupal 8, but they should work for Drupal 7 as well)

Installing contrib modules
  • composer require drupal/<MODULE_NAME>:~8.0 to get the latest stable version (or latest dev, if there is no “stable release")
  • composer require drupal/<MODULE_NAME>:dev-<BRANCH_NAME> to get the latest dev version
  • composer require drupal/<MODULE_NAME>:dev-<BRANCH_NAME>#<COMMIT_HASH> to get the exact version
Updating Drupal core/modules
  • composer update to update everything
  • composer update --dry-run to check for updates
  • composer update drupal/<MODULE_NAME> to update a single module
Patching packages

The cweagans/composer-patches plugin (which comes with the Drupal Composer template) will take patches from the "extra" section of the composer.json file:

"extra": { "patches": { "<PACKAGE/NAME>": { "<PATCH DESCRIPTION>": "<PATH/TO/PATCH/OR/URL>", ... }, ... } }


"extra": { "patches": { "drupal/core": { "Fix language detection": "patches/2189267-24.patch" } } }

After a new patch is added run:

  • composer install to apply patch
  • composer update nothing to make the composer-patches plugin write necessary changes to the composer.lock file
Installing custom/forked modules from Github For the case when a module repository contains its own composer.json

Register the repository in the "repositories" section of the composer.json file:

"repositories": [ { "type": "vcs", "url": "<REPOSITORY/NAME>" }, ... ],

Use composer require drupal/<MODULE_NAME>:dev-<BRANCH_NAME>#<COMMIT_HASH> to install the module.

For the case when the composer.json file is missing from the module repository

You'll need to use a bit more verbose variant:

"repositories": [ { "type": "package", "package": { "name": "drupal/<MODULE_NAME>", "version": "dev-custom", "type": "drupal-module", "source": { "type": "git", "url": "<REPOSITORY/NAME>.git", "reference": "<BRANCH-NAME>" } } }, ... ],

Use composer require drupal/<MODULE_NAME>:dev-custom#<COMMIT_HASH> to install the module.

For the case when the destination path should be different than modules/contrib

In addition to the above recipes, use the composer/installers plugin:

"extra": { "installer-paths": { "web/modules/custom/<MODULE_NAME>": ["drupal/<MODULE_NAME>"], ... } } Adding a JS library

Most popular libraries can be added easily with composer as they exist on Packagist. The tricky part is that most Drupal modules require that libraries are saved under the "libraries" directory while Composer installs them to "vendor". The composer/installers plugin can override package paths, but only for packages that depend on it. So, you'll need to override the composer.json file of the library stating that it has the composer/installers dependency.

Let's take a look at an example:

"repositories": [ { "type": "package", "package": { "name": "enyo/dropzone", "version": "4.3", "type": "drupal-library", "source": { "url": "", "type": "git", "reference": "master" }, "dist": { "url": "", "type": "zip" }, "require": { "composer/installers": "~1.0" } } }, ... ], ... "extra": { "installer-paths": { "web/libraries/{$name}" : ["type:drupal-library"], ... } }

After the above is added to the composer.json, run composer require enyo/dropzone:4.3 to download the library. Also, here we have used the exact version and added the "dist" section to make it possible for Composer to download a zip archive instead of cloning the Git repository.

Switch a dependency package to a forked version

Add the forked repository to the composer.json:

"repositories": [ { "type": "vcs", "url": "<REPOSITORY/NAME>" }, ... ],

Run composer require <PACKAGE/NAME>:dev-<BRANCH_NAME>#<COMMIT_HASH>

Update an existing Drupal 8 project to use Composer
  • Make a backup ;)
  • Delete everything that will be managed by Composer: Drupal's "core" folder, contrib modules, etc.
  • Delete all Drupal "root" files, such as index.php, update.php, README.txt... All of them.
  • Create "web" directory in the project root and move all remaining Drupal folders (sites, modules, themes, libraries, profiles, etc.) into it.
  • Copy the Drupal Composer template files to the project root.
  • Prepare a list of Drupal core and contrib module versions (and everything else that will be managed by Composer) that are used currently on the project. Then run composer require specifying every dependency with the exact version. You'll need to convert Drupal versions into Composer versions, here are some examples:
    • drupal/core:8.1.8 is obvious
    • drupal/admin_toolbar:8.1.15 refers to admin_toolbar 8.x-1.15
    • drupal/ctools:8.3.0-alpha26 refers to ctools 8.x-3.0-alpha26
    • drupal/config_installer:dev-8.x-1.x#a16cc9acf84dd12b9714def53be0ce280a5b0c1a refers to config_installer dev snapshot made from the a16cc9a commit of the 8.x-1.x branch
  • Manually update versions of Drupal core and contrib modules to "~8.0" in the "require" section of the composer.json file. That will make updates possible.
  • Run composer drupal-scaffold which will create the Drupal "root" files.
  • Make your webserver use "web" directory as the web root.
Categories: FLOSS Project Planets

Deeson: AI is a punk teenager and is angry at its parents

Mon, 2016-10-17 06:04

This blog post covers 50% of what I’m going to be talking about at this year’s Museums Computer Group conference at the Wellcome Trust in London, held on the 19th of October. The follow-up post will go live on the 20th - you can sign up here to be notified.

There are three important things you need to understand about artificial intelligence:

  1. It exists now
  2. It’s more capable than you know.
  3. It will replace you (unless you redefine who you are).

I’ll examine each one - it’ll be interesting to see what you think.

It exists now

Artificial intelligence, as a concept, has been around for a long time. From Hephaestus building the “fighting machines of the gods” to Mary Shelley’s Frankenstein, humans have thought about and created stories around our desire to replace the mighty gods with ourselves for several thousand years.

We see it today with modern franchises like “The Terminator” and “The Matrix”, and less recently with “2001: A Space Odyssey” and “Do Androids Dream of Electric Sheep/Blade Runner”. AI is so popular and accessible as a concept in mainstream media that if you ask people what they think it is, they think they’ll be able to answer.

But here’s the rub - it’ll sound something like “Killer Robots in the Future!”. Rarely do you hear anyone mention the effect of AI on the stock market or the Amazon website. I find this lack of awareness about AI frustrating and frightening because AI exists now, it has existed for decades, and it impacts almost every aspect of our daily lives.

The birth of AI as a research area happened in 1956 at Dartmouth College in New Hampshire as a small but well-funded programme that hoped to create a truly intelligent “thinking machine” within a generation. They failed of course, as creating intelligence isn’t particularly easy. But they laid the foundations. With others following, the acceleration of our understanding and the number of practical uses for AI has increased. And like most technologies, the rate of improvement in AI can be plotted as an S curve.

Technologies tend to have a slow adoption rate early on as a result of the limited capabilities they offer. As the offer increases, so does the adoption rate. Unlike exponential growth, the S curve understands and plots the reduction of the technology’s popularity as we find its maximum potential, or as market forces push funding into new technologies which will ultimately replace it.

A better way to picture the impact of a specific technology on our lives is as a game of chess. At the start of the game, the choices you make are small and of little significance. You can recover from a mistake. But by the time you reach the middle of the board every decision you make will have large significance, and each creates a win or lose situation. Games of chess also follow the S curve.

By the time a technology reaches the lower midpoint of the curve it starts to have a major visible impact, with the velocity of that impact suddenly starting to increase. Artificial intelligence is now at that point. AI is not just here, it’s a punk teenager and pissed off at it’s parents.

It’s more capable than you know.

You interact with AI and one of its children, Machine Learning, every time you use any web-connected device. You do it every time you search, shop online, fill out a form, send a Tweet, or upvote a comment. It even happens when you buy petrol, turn on the tap, drive your car to work, or buy any newspaper. Every aspect of your life is measured, stored, and used at some point by an algorithm.

Everything you do while living your life is kept as data so that machines can later parse it and use it to identify patterns. The effect is huge.

Roughly 70% of the world’s financial trading is controlled directly by 80 computers that use machine learning to improve their own performance. They can recognise an opportunity and carry out a purchase or sale within 3 milliseconds. The speed at which they operate means that humans are not only incapable of being part of the process, but have been designed out of the system completely to reduce error.

AI is rapidly getting to the point where it is better at diagnosing medical conditions than teams of doctors. Every patient report, every update to a patient’s condition, and every case history is available as digital data to be parsed, analysed and scored in real time to diagnose conditions that require a breadth of knowledge no single person has. In one case from Japan, AI was used to solve (in 10 minutes) a cancer diagnosis that oncologists had failed to detect (the human doctors had spent months trying).

Statistically, computers are better drivers than people are. In the 1.4 million miles Google’s fleet of self driving cars have covered on public roads, “not one of the 17 small accidents they’ve been involved in was the fault of the AI”. There’s the Google car driving into a bus that happened recently, but deep analysis of the incident showed that the bus actually drove into the car. A study by Virginia Tech showed that Google’s autonomous systems are 2.5 times less likely to have a car crash than a human. Given some of the behaviour I’ve experienced on the roads, I think this is a pessimistic number. AI is also being used to fly planes, with pilots of the Boeing 777 on average spending “just seven minutes manually piloting their planes in a typical flight” (anonymous Boeing 777 pilot). The United States and British governments have had fully autonomous drones flying for well over a decade.

Computers are now writing articles, poems, and even screenplays. Netflix’s now famously complicated taxonomy may have been put in place by people, but it’s machines that use it to work out what the next hit TV show will be. Associated Press uses AI to deliver over 3000 reports per year, while Forbes’ earning reports are all machine generated. These aren’t lists of numbers - this is long-form copy. Many sports reports are now written using AI, and they are published instantly as soon as the game ends. Before the team has left the field, the articles are being read. A study by Christer Clerwall showed that when asked to tell the difference between machine or human-written stories, people couldn’t. I mean, can you tell which parts of this blog were written by a machine?

Computers are better at designing their own components than people are. In the 1990’s Dr Adrian Thompson of Sussex University wanted a test on what would happen if evolutionary theory was put to use by machines in building an electrical circuit. The circuit was simple - all it had to do was recognise a 1KHz tone and drop the output voltage to 0, or for a 10KHz tone an output of 5 volts. An algorithm iterated over 4000 times before finding the best possible circuit. The circuit was tested, and it worked perfectly. The surprising thing though was that nobody could explain how the circuit worked, or manage to produce a better one. This experiment has been repeated many times, with more and more complexity introduced, and each time the machines make parts for themselves better than people can.

Computers are creating art, helping to cure the sick, improving themselves, and taking care of complex or monotonous tasks. We let them drive us, shop for us, fly us, and treat us. We let them form opinions for us, and let them entertain us. Where do people fit in?

It will replace you (unless you redefine who you are)

A study in 2013 showed that 47% of jobs in the United States were at risk of being replaced by automated systems. And a lot has happened in 3 years.

While your interactions with AI can make your life easier and more pleasant, they are designed to achieve something more. Every time you do something that can be logged and compared, you are training the AI in human behaviour. We can’t stop living our lives, so how can we stop the machines taking over?

If you are coming to the Museum's Computer Group Conference on October the 19th, I’ll tell you!

Categories: FLOSS Project Planets New Module - Referral Discount for Drupal Commerce

Mon, 2016-10-17 04:25
New Module - Referral Discount for Drupal Commerce Body

One of the popular Growth hacking technique for e-commerce and SaaS businesses is Referrals, which is to leverage your user's network to get new users by offering incentives / discounts. On a recent e-commerce project we had the requirement to create a complete referral system but couldn't find a module that came close to fulfilling the requirements, hence we developed and contributed Commerce Referral Discount. This module allows us to provide a discount credit to an existing user for referring new users. Discounts can be configured for both the referring user and the new user who joins as part of the referral. Lets see a typical flow:

  • User A invites user B to signup on website using a unique invite URL (

  • User B visits the site using this URL, and is taken to the registration form to create a new account.

  • User B gets some discount amount (say $5) which he could use on his first purchase.


  • After user B makes his first purchase, user A gets a discount amount (say $10), which could be used in the next purchase.

  • Both discount amounts are configurable from the admin backend.

Module Configuration:

  • To configure the discount amounts browse to /admin/config/referral-discount


  • Configure referral discount on product purchase at Administration » Store settings » Promotions » Discounts:

    • Go to admin/commerce/discounts page.

    • Click on "Add discount" button.

    • Choose discount type : Order discount

    • Choose offer type : Referral Discount

    • Now click on Save discount.


  • Configure Invite/Referral Link block

    • Visibility settings: Show block for authenticated user.

Commerce Referral Discount module provide "Invite/Referral Link" block, which contains unique refer/invite link for authenticated users to share across their friends. 

The module also integrates with views:

  1. It provides a view type 'Commerce Referral Discount' which can be used to list down all the discounts and other data which it stores in the 'commerce_referral_discount' table in database.
  2. It also provides relationship to the user entity, so you can also include the data of Referrer user and Invited user.


    Nikhil Banait Mon, 10/17/2016 - 13:55
    Categories: FLOSS Project Planets

    Janez Urevc: Drupal 8.2.0 and composer wonderland

    Mon, 2016-10-17 04:22
    Drupal 8.2.0 and composer wonderland

    Over the weekend I took some time to update this site to the latest and greatest Drupal. Update itself was pretty straightforward and it went without any problems (great work Drupal community!).

    More interesting part was something that I wanted to do for a while. Until now I was using old-school approach repo with all modules and other dependencies committed in it. Most of you probably already heard about the Composer. Thanks to Florian Weber (@webflo) and other contributors it is now fairly easy to manage your Drupal projects with it. There is a Composer template for Drupal projects available which will give you everything you need to get started. It took me just a good hour to fully convert my project (I am no Composer expert). I found this approach very nice and convenient and will be using it for all my future projects.

    As part of this I also worked on a pull request for Drupal docker project that makes docroot location configurable, which is a requirement for Composer driven projects.

    slashrsm Mon, 17.10.2016 - 10:22 Tags Drupal Docker Composer Enjoyed this post? There is more! Drupal dev environment on Docker runs on Drupal 8! Call for Drupal 8 media ecosystem co-maintainers
    Categories: FLOSS Project Planets

    Vardot: DrupalCon Dublin 2016 - What Drupal means to us?

    Mon, 2016-10-17 04:09
    Events Read time: 1 minute

    The DrupalCon in Dublin is over – and now it’s officially. We all had fun, enjoyed sessions, sprints, visited all the booths, collected prizes, and had a lot of great talks with drupalists from all over the globe. All the expectations we had before this event came true, and now it’s time to make some conclusions.

    But instead of writing a long recap, we at Vardot decided to remind you about the coolest moments of the conference in one short video. It's  better to see once than hear a hundred times – so enjoy!



    Did you find yourself in a video? If not, how would you describe Drupal with one word? Your opinion counts. What were the most exciting moments of the conference for you? Share your emotions in a comments section below and see you next year in Vienna!


    Tags:  DrupalCon Drupal Planet Title:  DrupalCon Dublin 2016 - What Drupal means to us?
    Categories: FLOSS Project Planets

    Drupalize.Me: Load Testing Our Site on Pantheon

    Mon, 2016-10-17 03:07

    I did some load testing to try and answer the question; How did moving our site from Linode to Pantheon affect the performance-measured in response time-of our site for both members and non-members?

    Categories: FLOSS Project Planets

    Aurelien Navarre: From $conf to $config and $settings in Drupal 8

    Mon, 2016-10-17 02:37

    With Drupal 7 we were used to leverage $conf to set variable overrides. Unfortunately this was sub-optimal. The Configuration override system documentation page says it best:

    A big drawback of that system was that the overrides crept into actual configuration. When a configuration form that contained overridden values was saved, the conditional override got into the actual configuration storage.

    Using $conf on Drupal 7

    Let's say you wish to query the {variable} table for the site name.

    mysql> SELECT name,value FROM variable WHERE name = 'site_name'; +-----------+----------------------+ | name | value | +-----------+----------------------+ | site_name | s:12:"My site name"; | +-----------+----------------------+ 1 row in set (0.00 sec)

    You can quickly get the information you want and confirm this is indeed the value your site returns at /admin/config/system/site-information. Now, if you want to override the entry in code, you can put the below variable override in settings.php.

    // Override the site name. $conf['site_name'] = 'My new site name';

    When bootstrapping, Drupal would return the overridden site name with the original value left untouched in the database. Easy. Doing so also means the value provided in code wouldn't be modifiable from the Drupal administration interface any longer. Well, you could modify it, but it'd be overridden no matter what.

    In Drupal 8 the variable subsystem is gone and we now need to leverage either $config or $settings depending upon what we wish to achieve. Both are being set via Settings::Initialize - Let's explore each to understand the differences.

    When to use $config in Drupal 8?

    $config is brought to you by the Configuration Management system. To keep it really simple, think about variable overrides and call them configuration overrides instead. And as you can see below, there are indeed similarities:

    • You can globally override specific configuration values for the site.
    • Any values you provide in these variable overrides will not be viewable from the Drupal administration interface. (Don't think that makes sense? There's an issue for that.)

    But there are also notable differences. One I think worth mentioning is related to modules. In Drupal 7, it was easy to disable a module via $conf, by setting the below variable override.

    $conf['page_load_progress'] = 0;

    This was useful when - for instance - willing to have certain modules disabled in non-prod environments.

    In Drupal 8 though, overriding the list of installed modules in core.extension is not supported as module install or uninstall has not occurred and modules cannot be disabled anymore. There is a contrib module to try and bring back this functionality to Drupal 8, but be careful of unintended consequences on a production site.

    There are other particular configuration values that are risky to override, like field storage configuration which could lead to data loss. So, really, you have to make sure what is going to be overridden wouldn't have a negative impact on your site.

    In any case, the administration interface displays the values stored in configuration so that you can stage changes to other environments that don't have the overrides. If you do want to see the overrides, then there's the Drush --include-overridden argument to do just that.

    Let's say we wish to override the site name via settings.php.

    $config['']['name'] = 'My new site name';

    To see the default and overridden values with Drush, just type the following.

    // Default value $ drush @site.env config-get name '': 'My site name' // Overridden value $ drush @drucker.local config-get name --include-overridden '': 'My new site name'

    Or you can use the Drupal API directly.

    // Default value >>> $site_name = \Drupal::config('')->getOriginal('name', FALSE); => "My site name" // Overridden value >>> $site_name = \Drupal::config('')->get('name', FALSE); => "My new site name" When to use $settings in Drupal 8?

    Let's try to understand the difference with $config. It's clearly explained in \Drupal\Core\Site\Settings

    Settings should be used over configuration for read-only, possibly low bootstrap configuration that is environment specific.

    settings.php tries to clarify that even more.

    $settings contains environment-specific configuration, such as the files directory and reverse proxy address, and temporary configuration, such as security overrides.

    In other words, this refers to settings that wouldn't exist in the Configuration Management system. Here's an example. When defining the private path, you don't have a choice but to define it via settings.php.

    $settings['file_private_path'] = '/mnt/private/files';

    Another example is API keys. You certainly don't want those or other sensitive information to be stored in the configuration and exported in YAML files and/or tracked under version control.

    Hopefully that clarifies the difference between $config and $settings. Let me know how you work with them and if I missed anything.

    Categories: FLOSS Project Planets

    A Dev From The Plains: Upgrading Drupal’s Viewport module to Drupal 8 (Part 3 – Final)

    Sun, 2016-10-16 05:44

    Image taken from

    With parts one and two of the series covered, this 3rd (and final!) part will cover some other important aspects of Drupal development that I wanted to pay attention to while working on the Drupal 8 version of the viewport module.

    Essentially, the kind of aspects that are easy to forget (or ignore on purpose) when a developer comes up with a working version or something “good enough” to be released, and thinks there’s no need to write tests for the existing codebase (we’ve all done it at some point).

    This post will be a mix of links to documentation and resources that were either useful or new to me, and tips about some of the utilities and classes available when writing unit or functoinal tests.


    Since I wrote both functional tests and unit tests for the viewport module, this section is split in two parts, for the sake of clarity and structure.

    - Functional tests

    Before getting into the bits and blobs of functional test classes, I decided read a couple articles on the matter, just to see how much testing had changed in the last year(s) in Drupal 8. This article on the existing types of Drupal 8 tests was a good overview, as well as Acquia’s lesson on unit and functional tests.

    Other than that, there were also a few change notices I went through in order to understand what was being done with the testing framework and why. TL;DR: Drupal runs away from simpletest and moves to PHPUnit to modernise the test infrastructure. That started by adding the PHPUnit test framework to Drupal core. Also, new classes were added that leveraged PHPUnit instead of the existing Simpletest-based classes. Specifically, a new KernelTestBase was added, and also a BrowserTestBase class, replacing the well-known WebTestBase.

    I decided to base all my tests in the PHPUnit classes exclusively, knowing that Simpletest will just die at some point. One of the key requirements for this was to put all test classes in a different path: {module-folder}/tests/src/{test-type}/{test-classes}. Also, the @group annotation was still required, as with Simpletest, so that tests of specific groups or modules can be executed alone, without all the test suite running.

    The first thing I noticed when I started to write the first Functional test class, ViewportPermissionsTest, was that the getInfo() method was no longer needed, since it’s been removed in favor of PHPDoc, which means all the info there is retrieved from the documentation block of the test class.

    With PHPUnit introduced in Drupal 8, a lot of new features have been added to test classes through PHP Annotations. Without getting into much details, two of them that called my attention when trying to debug a test, were the @runTestsInSeparateProcesses and @preserveGlobalState  annotations. Most of the time the defaults will work for you, although there might be cases where you may want to change them. Note that running tests in separate processes is enabled by default, but some performance issues have been reported on this feature for PHPUnit.

    I also came across some issues about the lack of a configuration schema defined for my module, when trying to execute tests in the ViewportTagPrintedOnSelectedPagesTest class, which led me to find another change notice (yeah… too many!) about tests enforcing strict configuration schema adherence by default. The change notice explains how to avoid that (if really necessary), but given that’s not a good practice, you should just add a configuration schema to all your modules, if applicable.

    Some other scattered notes of things I noticed when writing functional tests:

    • drupalPostForm() $edit keys need to be the HTML name of the form field being tested, not the field name as defined in the Form API $form array. Same happens with drupalPost().
    • When working on a test class, $this->assertSession()->responseContains() should be used to check HTML contents returned on a page. The change notice about BrowserTestBase class, points to $this->assertSession()->pageTextContains(), but that one is useful only for actual contents displayed on a page, and not the complete HTML returned to the browser.
    - Unit Tests

    The main difference between unit tests and functional tests (speaking only of structure in the codebase), is that unit tests need to be placed under {module-name}/tests/src/Unit, and they need to extend the UnitTestCase class.

    Running PHPUnit tests just requires executing a simple command from the core directory of a Drupal project, specifying the testsuite or the group of tests to be executed, as shown below:

    php ../vendor/bin/phpunit –group=viewport

    php ../vendor/bin/phpunit –group=viewport –testsuite=unit

    As mentioned in the link above, there has to be a properly configured phpunit.xml file within the core folder. Also, note that’s testbot runs tests in a different way. As detailed in the link above, tests can be executed locally in the same way the bot does, to ensure that the setup will allow a given module to receive automated testing support once contributed to

    PHPUnit matchers: In PHPUnit parlance, a matcher is ultimately an instance of an object that implements the PHPUnit_Framework_MockObject_Matcher_Invocation interface. In summary, it helps to define the result that would be expected of a method call in an object mock, depending on the arguments passed to the method and the number of times it’s been called. For example:

    $this->pathMatcher->expects($this->any()) ->method('getFrontPagePath') ->will($this->returnValue('/frontpage-path'));

    That’s telling the pathMatcher mock (don’t confuse with a PHPUnit matcher), to return the value “/frontpage-path” whenever the method getFrontPagePath() is called. However, this other snippet:

    $this->pathMatcher->expects($this->exactly(3)) ->method('getFrontPagePath') ->will($this->returnValue('/third-time'));

    It’s telling the mock to return the value “/third-time”, only when the getFrontPagePath() method is executed exactly 3 times.

    will(): As seen in the examples above, the will() method can be used to tell the object mock to return different values on consecutive calls, or to get the return value processed by a callback, or fetch it from a values map.

    These concepts are explained in more detail in the Chapter 9 of the PHPUnit manual.

    Coding Standards and Code Sniffer

    With the module fully working, and tests written for it, the final stage was to run some checks on the coding standards, and ensure everything is according to Drupal style guides. Code Sniffer makes this incredibly easy, and there’s an entire section dedicated to it in the Site Building Guide at, which details how to install it and run it from the command line.

    Finally, and even though I didn’t bother changing the README.txt contents, I also noticed the existence of a README Template file available in the online documentation, handy when contributing new modules. With all the codebase tidied up and proper tests in place, the module was finally good to go.

    That’s it! This ends the series of dev diaries about porting the Viewport module to D8. I hope you enjoyed it! There might be a similar blog post about the port process of the User Homepage module, so stay tuned if you’re interested in it.

    Links and (re)sources

    As usual, I’ll leave a list of the articles and other resources I read while working on the module upgrade.

    • Which D8 test is right for me?: link.
    • Acquia’s lesson on Unit and Functional tests: link.
    • Simpletest Class, File and Namespace structure (D8): link (note Simpletest wasn’t used in the end in the module port).
    • Converting D7 SimpleTests to D8: link.
    • Configuration Schema and Metadata: link.
    • Drupal SimpleTest coding standards: link
    • PHPUnit in Drupal 8: link.
    • Agile Unit Testing: link.
    • Test Doubles in PHPUnit: link.
    • Drupal coding standards: link.
    • README Template file: link.
    Change Records and topic discussions
    Categories: FLOSS Project Planets

    Drupal core announcements: No Drupal core security release planned for Wednesday, October 19

    Fri, 2016-10-14 23:11

    The monthly security release window for Drupal 8 and 7 core will take place on Wednesday, October 19.

    Unless there is an unexpected security emergency, however, this window will not be used and there will be no Drupal 8 or 7 core releases on that date.

    Drupal 8 site owners should note that the Drupal 8.1.x branch is no longer supported; sites running on an 8.1.x release should therefore update to the Drupal 8.2.x branch as soon as possible in preparation for any future security releases. (The most recent release on that branch is 8.2.1, as of the date of this post.)

    Similarly, Drupal 7 site owners should update to the 7.51 release (the most recent Drupal 7 release as of this post), which includes the larger changes from Drupal 7.50 as well.

    Other upcoming core release windows include:

    • Wednesday, November 2 (patch release window)
    • Wednesday, November 16 (security release window)

    Drupal 6 is end-of-life and will not receive further releases.

    For more information on Drupal core release windows, see the documentation on release timing and security releases, as well as the Drupal core release cycle overview.

    Categories: FLOSS Project Planets

    DrupalEasy: DrupalEasy Podcast 187 - Breaking BADCamp (Anne Stefanyk, Heather Rodriguez, Jon Peck - BADCamp)

    Fri, 2016-10-14 22:25

    Direct .mp3 file download.

    BADCamp organizers Anne Stefanyk, Heather Rodriguez, and Jon Peck join Mike Anello and Ryan Price to discuss the biggest and baddest (pun intended) non-DrupalCon event in all the land(s)! Recent Drupal-related news, picks of the week, and five questions are - as always - included free with this episode.

    Interview DrupalEasy News Three Stories Sponsors Picks of the Week Upcoming Events Follow us on Twitter Five Questions (answers only)
    1. Plays synthesizer for a progressive rock band, Imager.
    2. Dokuwiki.
    3. "Bike in a basket" - build a motorcycle
    4. Llamas.
    5. WNY DrupalCamp.
    Intro Music Subscribe

    Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

    If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

    Categories: FLOSS Project Planets

    Drupal Association News: Here’s to our Drupal Association Supporting Partners! – Q3

    Fri, 2016-10-14 14:54

    There are many inspiring companies that are giving their time to contribute code, help educate others, share their experiences, and be part of the Drupal community. Some of these companies have taken one step further, becoming Supporting Partners with the Drupal Association.

    Supporting Partners fund and the engineering team who make the improvements you continuously see. Without our Supporting Partners, the work we do would not be possible.

    Here is what is going on now.

    Q3 2016 Roadmap


    We would like to acknowledge the companies that continue to show their endless support. Here is a list of new and renewing companies just this quarter:

    2. OpsGenie
    3. Kellton Tech Solutions Ltd.
    4. PSW Group GmbH & Co. KG
    5. ANNAI Inc
    7. PreviousNext
    8. KWALL
    9. Code Koalas Digital Bridge Solutions
    10. Mediacurrent Interactive Solutions
    11. Trellon LLC
    12. XIO
    13. Live Person
    14. Pantheon
    15. Rochen Ltd.
    16. Bluehost, Inc.
    17. BlackMesh Inc.
    18. Arvixe, LLC
    19. Green Geeks
    20. JetBrains
    22. HighWire Press
    23. Wunder Group
    24. ADCI Solutions
    25. Inclind Inc.
    26. Appnovation Technologies
    27. GeekHive
    28. Deeson
    29. Isovera
    30. Forum One

    Our Supporting Partners, Technology Supporters, and Hosting Supporters help us make great. They also become some of the best-known Drupal contributors. Read about the program benefits and if you want to give back to the Project, please contact our Executive Director, Megan Sanicki, for details.

    Categories: FLOSS Project Planets

    Zivtech: 4 Common Developer Concerns in a Site Migration

    Fri, 2016-10-14 12:43

    Websites have a shelf life of about 5 years, give or take. Once a site gets stale, it’s time to update. You may be going from one CMS to another, i.e., WordPress to Drupal, or you may be moving from Drupal 6 to Drupal 8. Perhaps the legacy site was handcrafted, or it may have been built on Squarespace or Wix.

    Content is the lifeblood of a site. A developer may be able to automate the migration, but in many cases, content migration from an older site may be a manual process. Indeed, the development of a custom tool to automate a migration can take weeks to create, and end up being far costlier than a manual effort.

    Before setting out, determine if the process is best accomplished manually or automatically. Let’s look at the most common concerns for developers charged with migrating content from old to new.

    1. It’s All About Data Quality

    Old data might not be very structured, or even structured at all. A common bad scenario occurs when you try to take something that was handcrafted and unstructured and turn it into a structured system. Case in point would be an event system managed through HTML dumped into pages.

    There's tabular data, there are dates, and there are sessions; these structured things represent times and days, and the presenters who took part. There could also be assets like video, audio, the slides from the presentation, and an accompanying paper.

    What if all that data is in handcrafted HTML in one big blob with links? If the HTML was created using a template, you might be able to parse it and figure out which fields represent what, and you can synthesize structured data from it. If not, and it's all in a slightly different format that's almost impossible to synthesize, it just has to be done manually.

    2. Secret Data Relationships

    Another big concern is a system that doesn't expose how data is related.

    You could be working on a system that seems to manage data in a reasonable way, but it's very hard to figure out what’s going on behind the scenes. Data may be broken into components, but then it does something confusing.

    A previous developer may have used a system that's structured, but used a page builder tool that inserted a text blob in the top right corner and other content in the bottom left corner. In that scenario, you can't even fetch a single record that has all the information in it because it's split up, and those pieces might not semantically describe what they are.

    3. Bad Architecture

    Another top concern is a poorly architected database.

    A site can be deceptive because it has structured data that describes itself. The system could find stuff as each element was requested, but then it is really hard to find the list of elements and load all of the data in a coordinated way.

    It's just a matter of your architecture. It’s important to have a clearly structured, normalized database with descriptively named columns. And you need consistency, with all the required fields actually in all the records.

    4. Automated Vs. Manual Data Migration

    Your migration needs to make some assumptions about what data it’s going to find and how it can use that to connect to other data.

    Whether there are 6 or 600,000 records of 6 different varieties, it's the same amount of effort to automate a migration. So how do you know if you should be automating, or just cutting and pasting?

    Use a benchmark. Migrate five pieces of content and time out how long that takes. Multiply by the number of pieces of content in the entire project to try to get a baseline of what it would take to do it manually. Then estimate the effort to migrate in an automated fashion. Then double it. Go with the number that’s lower.

    One of the reasons to pick a system like Drupal is that the data is yours. It's an open platform. You can read the code and look at the database. You can easily extract all of the data and take it wherever you want.

    If you’re with a hosted platform, that may not be the case. It's not in the hosted platform’s best interest to give you a really easy way to extract everything so you can migrate it somewhere else.

    If you're not careful and you pick something because it seems like an easy choice now, you run the risk of getting locked in. That can be really painful because the only way to get everything out is to cut and paste. It’s still technically a migration. It's just not an automated one.

    Categories: FLOSS Project Planets