Writing better Drupal code with static analysis using PHPStan
PHP is a loosely typed interpreted language. That means we cannot compile our scripts and find possible execution errors without doing explicit inspections of our code. It also means we need to rely on conditional type checking or using phpDoc comments to tell other devs or IDE what kind of value to expect.
Two Zero One Nine
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.
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.
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?
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.
Test driven development in PhpStorm with auto-testing enabled
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.
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.