Writing tests first saves time and money later on
Matt Glaman
by mglaman
3d ago
The TalkingDrupal podcast had Alexey Korepov on to talk about Test Driven Development. Alexey has written the Test Helpers module, a development package that provides many useful utility tools for writing unit tests for your Drupal code ..read more
Visit website
Ensuring smart_date works for all versions of Drupal 10 and 11
Matt Glaman
by mglaman
2w ago
At MidCamp a few weeks ago, Martin Anderson-Clutz tapped me on the shoulder to check out a Smart Date issue for compatibility with Drupal 10.2. As of Drupal 10.2, ListItemBase::extractAllowedValues takes an array as its first argument versus a string. The method used to explode a newline separated string into an array for its callers. I took a look at the issue. The change affected the parseValues method in the SmartDateListItemBase class. The parseValues method takes the field's values and passes them to extractAllowedValues, the method with a changed signature in Drupal 11. The original meth ..read more
Visit website
Drupal has made contributing to open source a marketing opportunity
Matt Glaman
by mglaman
1M ago
Drupal has done something unique with contributing to open source. Our community has made contributing to the open source project a marketing opportunity for organizations using Drupal. Generally, contributing to open source projects reflects at the individual level. There isn't a great way to reflect if the individual did it out of some intrinsic value to improve open source or by sponsored work with their employer or a customer. As far as I know, Drupal is the only open source project providing this kind of attribution ..read more
Visit website
Improving the Drupal theme starterkit and theme generation experience
Matt Glaman
by mglaman
1M ago
Wanting to follow up on our work at MidCamp 2023 with the Development Settings form, Mike Herchel wanted to jam on another issue to improve the life of frontend developers. Drupal provides a way to generate themes from starterkit themes. Drupal core provides the Starterkit theme, and contributed themes can also mark themselves as a starterkit theme. All a theme has to do is have starterkit: true in their info.yml file. And that's it! Optionally, a specifically named PHP file can be provided in the theme for specific processing to finish generating the new theme. Unfortunately, the experience o ..read more
Visit website
Verifying your Drupal site's configuration against changes from dependency updates
Matt Glaman
by mglaman
2M ago
Previously, I wrote about leveraging Dependabot to automate dependency updates for my Drupal projects. Automating dependency updates saves a lot of time. However, Drupal core or contributed modules may perform updates that modify the configuration state of your Drupal site that needs to be re-exported. A standard continuous integration pipeline that only performs code linting and tests will miss these changes. For my projects, I have a job that runs the update process for the Drupal site and fails if the configuration has been modified at runtime by these updates. This lets me know I have to p ..read more
Visit website
Building my career, thanks to the opportunity of open source
Matt Glaman
by mglaman
2M ago
This year, I have the honor of being one of the featured speakers at Florida DrupalCamp (February 23 to 25, 2024.) I will be speaking about the opportunity of open source. Working with open source has created tremendous opportunities for me and led to a fulfilling career and life – beyond what I could have ever imagined ..read more
Visit website
My Dependabot configuration for Drupal (and other PHP projects)
Matt Glaman
by mglaman
3M ago
I use GitHub to host my repositories, such as this website. To keep my dependencies up-to-date, I leverage Dependabot. The product has matured a lot over the past few years. Before, it was a standalone service and then acquired by GitHub. It did not support dependencies managed by Composer. It was pretty spammy and very noisy. However, it has drastically improved over the past few years. Thanks to all of those at GitHub who have worked to improve it (that includes you, Mike Crittenden.) My Dependabot configuration consists of a few items, nothing overly specific ..read more
Visit website
Looking back on 2023
Matt Glaman
by mglaman
4M ago
It's the end of 2023! The end of the year is a special time. We can look at the calendar and say, "I can't believe the year is already over," and "This has only been one year?" I always do an end-of-year review of my notebooks to remind myself of the year's events, successes, or failures to grow from next year. A lot happened this year. Here are a few things I wanted to share. The Drupal 10 Development Cookbook was released! The Drupal 10 Development Cookbook came out at the beginning of the year. My goal for the audience was to pivot from Drupal 7 to a "just Drupal" narrative and target anyon ..read more
Visit website
A playground to test Drupal code with phpstan-drupal is coming soon!
Matt Glaman
by mglaman
5M ago
I'm excited to announce a new feature coming to phpstan-drupal that already exists for PHPStan. PHPStan has an online playground to run and test analysis results. Soon, we will have one for phpstan-drupal! The online playground is an extremely useful tool when reporting bugs to PHPStan and will make it easier to report bugs for phpstan-drupal.  I had thought about building this previously but was concerned about possible costs. After all, phpstan-drupal is a personal open-source project. It was brought up again in the #phpstan channel in Drupal Slack by Dezső Biczó (mxr576.) In great timi ..read more
Visit website
PHPStan is now running for all Drupal modules on GitLab CI!
Matt Glaman
by mglaman
5M ago
The Drupal Association has been working on a monumental effort to migrate away from our bespoke DrupalCI continuous integration system to GitLab CI as part of the GitLab Acceleration Initiative. Drupal core's test runs are five times faster using GitLab CI. I have loosely followed the progress as Drupal moves from our custom-built infrastructure onto GitLab. But someone shared with me a little feature I missed: adding a PHPStan job to the default GitLab CI templates ..read more
Visit website

Follow Matt Glaman on FeedSpot

Continue with Google
Continue with Apple
OR