Auto discovery of global commands in Drush
hook_update_N or hook_post_update_NAME
Today I realized that I had no idea when it was appropriate to use hook_update_N or hook_post_update_NAME. I have ideas, but I was not sure about the concrete reasons. My gut instinct is that hook_update_N is for schema and other database-related changes.
Documenting PHPStan + Drupal!
In the early days of Drupal 9, most folks were only using PHPStan on their Drupal sites via drupal-check for deprecation checks. I am excited to see more folks using PHPStan directly with phpstan-drupal to perform static analysis and deprecation checks.
Ensuring Drupal route lookups by path are cached by domain
In this episode of "Matt does ridiculous things with Drupal," I found out that the inbound processing of a path and the lookup for its route gets cached. That makes sense, it can be an expensive process to say /foo is actually an alias of /node/1 and should go to the entity view controller.
Registering your PHPUnit test as an event subscriber for testing events
I love leveraging events in my application architecture. Drupal uses the EventDispatcher component from Symfony, which implements the Mediator and Observer design patterns.
The Typed Data API, by example
There is a fantastic low-level API in Drupal called the Typed Data API. It is fantastic and provides a great way to handle data representation via a schema and validate that data's values. The Typed Data API is the foundation for the Entity API.
Better static analysis with entity type storages in phpstan-drupal 1.10
I am happy to announce the 1.1.0 release of phpstan-drupal! This is a minor version bump due to a breaking change in the configuration options for phpstan-drupal.
A year of something new and now for something different
9 years as a professional developer
While I don't precisely enjoy using Facebook anymore, the memories feature can be helpful. Like, today! Nine years ago, I had my first day as an official web developer. The local marketing agency Dooley & Associates hired me as their first in-house web developer.
PHPStan 1.0 and phpstan-drupal 1.0!
Congratulations to Ondřej for releasing PHPStan 1.0 today! Years ago, folks weren't thinking very much about static analysis in PHP.