Skip to main content

Getting phpstan-drupal PHP 8 ready starts, now!

Published on

This week I will be kicking off development for phpstan-drupal after Florida DrupalCamp astoundingly met my funding goals. Since this open source work and I am being funded publicly, I plan to do as much development over live streams as possible. I really enjoy live coding, and I hope it helps teach folks some tricks.

I have been using YouTube for my scheduled live streams, but I plan on giving Twitch a try. If you'd like to pop in and watch along as I work on the testing matrix for phpstan-drupal, follow me and get notified when I go live: https://www.twitch.tv/mglaman. I plan on going live at least every Wednesday at 1 PM CST (7 PM UTC) for two hours.

Next steps

The first goal is to get concurrent testing of Drupal 8 and Drupal 9. You can run phpstan-drupal against Drupal 9 and find deprecations perfectly. It's just that I don't have any test coverage. I want to keep testing Drupal 8 to make sure Drupal 9 and 10 don't break Drupal 8 autoloading. I highly doubt they will, but the extension mimics Drupal's autoloading and kernel bootstrap. So there's a high chance of bugs.

To do this, I need to get creative. Right now, Drupal 8 is added as a development dependency for the tests. I need it to support Drupal 9 or greater. That means I also need to make different test suites for PHPUnit. These would run based on the current Drupal major version being tested.

Once this is set up, it is straightforward to add PHP 8 testing support. 

I'm available for one-on-one consulting calls – click here to book a meeting with me 🗓️