Adding backward compatibility to Rector rules
Rector is a PHP tool that automates refactoring your code to take advantage of the latest language-level features in PHP or automated usages of deprecated code when upgrading your dependencies.
📘 Understanding Drupal: A Complete Guide to Caching Layers — my new book is out now!
Rector is a PHP tool that automates refactoring your code to take advantage of the latest language-level features in PHP or automated usages of deprecated code when upgrading your dependencies.
In a previous blog post, I explained the list cache tag for entity types, which you use when displaying a list of entities. This cache tag ensures that appropriate render caches and response caches are invalidated whenever a new entity is created, or an existing one is saved.
The PHPStan 1.10.3 release shipped with a new @not-deprecated annotation! This is a great utility, and I am very thankful to stof for contributing this to PHPStan.
I'm a huge fan of using data sets for PHPUnit test cases to cover as many permutations as possible with given inputs. The only problem is when you want to execute a specific data set for the test. I'm not much of a PHPUnit command line guru since I run tests individually in PhpStorm.
Selwyn Polit has created a fantastic Drupal 9 and 10 developer reference guide called Drupal at your fingertips.
Jeff Geerling recently announced that the DrupalVM project is officially archived. DrupalVM was crucial in helping provide standardized local development for Drupal developers. DrupalVM was a customized Vagrant setup with batteries-included tooling powered by Jeff's many Ansible roles.
One of Drupal's greatest features, and often mysterious underworking to many site builders and developers, are its caching layers especially render caching. We have all been there before: we have no idea why it's not quite working, so we press "Cache rebuild" (or more infamously, "Flush all caches" of the pre-Drupal 8 eras), and like magic, things are displaying properly.
The Drupal 10 Development Cookbook is officially out! Special thanks to Kevin Quillen for his amazing assistance in writing the book. And my good friend Justin Cornell as a technical reviewer.
When building my wife's web store, I used a new feature in Drupal 10 when templating her product display pages. Drupal 10 introduced a new Twig filter called add_suggestion.
One of my favorite features of Drupal is the user access control experience. Drupal has a robust permission and role (access control list) API that allows for fine-tuned control of what users can and cannot do. Drupal developers end up interacting with Drupal's access system in one way or another. Every project has some request to enhance or alter how normal access works.