PHPStan Drupal: detecting deprecated constants and preparing for PHPStan 0.12 support
At the beginning of December, Ondřej Mirtes released PHPStan 0.12! 0.12 brought about many changes. However, 🙃, it broke the PHPStan Drupal extension.
At the beginning of December, Ondřej Mirtes released PHPStan 0.12! 0.12 brought about many changes. However, 🙃, it broke the PHPStan Drupal extension.
You may have heard of Drupal Check. You may wonder what in the world it is or how it even came to be. I realized this went from an internal research and development task for a product, to open source contribution and then to an essential tool in the march toward Drupal 9.
Last month I wrote about 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.