Blog

Published on Tuesday 20, November 2018

People often tell each other to have a good day. But, it has become one of those customary things to say without much meaning behind it. Which is a shame, because we really should remind ourselves to have a good day. A few weeks ago my son Aiden left me a note, which I found after dropping him off at school.

Thumbnail

Fall has felt like a whirlwind. I caught myself chasing after the eternal pile of work that needed to be done and not recognizing the victories of the day. Instead of letting myself have a good day, I was forcing myself to a negative for the next day. I wasn't having bad days, but I found myself less than chipper. I found myself working at home more than riding my bike to the coworking space downtown, I had stopped running and reading. I didn't fill those gaps with work, I just took moments to sit.

It is funny how a little note can cause you to stop, think, and act. Despite the wintry midwestern weather setting in (~30°F / ~2°C) I have been able to pick up running again and get my reading back on track. Sometimes you just need a reminder to focus on the victories of the day and remember you did all you can do.

Published on Thursday 18, October 2018

Running Drupal's Nightwatch test suite on DDEV

This is the third, and final post in my series on running Drupal’s various test suites using the DDEV local development stack. Previously I covered running Drupal’s Unit, Kernel, and Functional tests and then running Chromedriver to execute the FunctionalJavascript test suite. In this post, I will talk about running the newly introduced Nightwatch.js test framework.

Published on Tuesday 16, October 2018

Running Drupal's FunctionalJavascript tests on DDEV

This is part two of a series on running Drupal’s testing suites on DDEV. We left off last time with trying to execute a FunctionalJavscript test and having every test case skipped because no browser emulator was available. In this post, we will run through getting set up to execute Drupal’s FunctionalJavascript tests inside of your DDEV web container.

Published on Friday 12, October 2018

Running Drupal's PHPUnit test suites on DDEV

DDEV is a local development stack built on top of Docker. It gives you all of your environment needs without messy configured on your host machine, without needing to know Docker or configure your own containers. Which is great, and makes life easier. Instead of just using DDEV to develop your site or application locally, why not also run your tests within it?

Published on Wednesday 10, October 2018

OK PhpStorm, what methods does my entity have?

Working in object-oriented programming is great. You can define interfaces which specify a contract that implementers need to fulfill. You can then extend these to define your end requirement and provide the implementation. This also means you can guarantee an object that implements that interface will have a guaranteed set of known methods. In Drupal, all entities implement EntityInterface, this is how we know that an entity can return its identifier, label, language, and other common methods.

Published on Sunday 7, October 2018

I am looking to try something new on my site, adding a way to just provide quick updates. Possibly experimenting with it being my way to publish to social networks.

Published on Saturday 6, October 2018

Test driven development in PhpStorm with auto-testing enabled

When I work, I try to follow the principles of Test-Driven Development. I have found it to aid me in writing cleaner code, identifying odd coupling of components or crazy accidental dependencies between components. It also lets me write my API first by using mocks against interfaces I have defined. PhpStorm's auto-test functionality speeds up my test-driven development process.
Published on Thursday 27, September 2018

Tracking changes in Migrate with dynamic row hashes

When it comes to Drupal and external data, I use Migrate. A lot. Like a lot, lot, lot. Many times this data is being imported over CSV files that are pushed to a server at some defined interval. Usually, the data can be derived directly from the CSV file itself, other times a custom process plugin derives data from other information. Drupal's Migrate system has two steps to check if new data should be imported or skipped. First, you can tell the migration source to track changes for each row. Then, if you are tracking changes, it hashes each row of data to see if it has been changed.

Published on Monday 24, September 2018

Xdebug over the command line with DDEV

I moved over to DDEV for my local development stack back in February. One of my favorite things is the ease of using Xdebug. You can configure Xdebug to always be enabled, or turn it on and off as needed (my preferred method.) When you have Xdebug enabled, it also enables it for any PHP scripts executed over the command line. That means you can debug your Drush or Drupal Console scripts like a breeze!

This article is based on using Xdebug within PhpStorm, as it is my primary IDE.