RSSAmplifier

Blog

matt glaman - open source php and drupal developer

open source php and drupal developer

mglaman.devRSS feed ↗25 posts

Latest posts

phpstan-drupal 2.1.0: stricter defaults

phpstan-drupal 2.1.0 is out. The theme of this release: rules and behaviors that proved themselves as opt-ins are now the defaults. If you run `composer update` and see new errors, that is the release working as intended — everything below includes the configuration to opt back out. Nine rules are now enabled by default These rules shipped as opt-ins over the 2.0 cycle. They have had time to bake,…

Dynamic type expressions in Drupal config schema

Drupal's config schema YAML supports dynamic expressions inside square brackets that resolve to values from the surrounding configuration data at runtime. Most developers have seen them — [%parent.type] in field formatter schema is a classic example — but few understand exactly how they work or when to use them. I found a Todoist task from December 4th, 2024:…

How Drupal's chained fast backend keeps APCu cache consistent across your web servers

Drupal's cache.backend.chainedfast makes your site faster without any configuration. All you need is to have APCu on your server. It shows up in the bootstrap, config, and discovery cache bins, and most developers never think about it or even know it is being leveraged. The chained-fast backend combines two backends: a fast, inconsistent backend (APCu, local to each web server process) and a…

Catch @todo comments referencing the current issue

When making code changes or fixing issues, it's easy to leave @todo comments behind. Sometimes they mark areas waiting on an upstream fix, sometimes they're reminders that never got revisited. Either way, they accumulate — and the ones tied to the specific issue you're working on should be resolved before the MR merges. phpstan-drupal 2.0.12 adds TodoCommentWithIssueUrlRule to catch this in the…

Understanding Drupal: A Complete Guide to Caching Layers is now published!

After starting in early 2023 and having a long hiatus from writing, my book Understanding Drupal: A Complete Guide to Caching Layers is now published on LeanPub! Three years ago (😱), I started working on this book that I wanted to self-publish. I got to about 65% of the way there and had a hard time wrapping up. Then things got busy at work, as I helped lead the launch of Acquia Source. But now…

The nightmare of permissions and OAuth scopes in Drupal

Drupal's role-based access control is one of its strengths. Permissions and roles are well-understood, and the system is mature. But the moment you step outside the standard cookie-based session — say, into OAuth with the authorization code flow — you hit a wall that the core permission model never anticipated. Super-permissions and their hidden assumptions Drupal treats administer nodes and…

drupalorg-cli 0.8.0: GitLab issue fork and merge request commands

The 0.7.0 release was housekeeping — fixing the release notes command and clearing out deprecation warnings. 0.8.0 has two goals: add native GitLab issue fork and merge request commands, and make the CLI useful for developers using AI agents to assist with Drupal.org issues.

Automating Drupal release notes in Dependabot PRs

I maintain drupal-mrn.dev, a tool widely used by maintainers to generate release notes for Drupal modules. It simplifies the changelog process, but consuming those notes has remained a manual step for site architects reviewing updates.

Preventing a `drush updb` from clearing your caches

By default, drush updb clears the cache after applying database updates. For deployments where you want to avoid an unnecessary performance hit, you can prevent this default behavior using a Drush pre-command hook. The updb command has a --cache-clear flag that you can set up in your CI workflow, but what about local testing? Will you or your team remember to set that flag every time? I've come to…

AI workflows will reshape development organizations

AI was a big topic at the EvolveDigital Summit last week. AI is also a big part of my day-to-day work. I've been thinking more and more about what it means for me as a software engineer. The "AI bubble" might burst (or maybe not), but the fundamental shift in development workflows has happened. The tools are here, and they aren't leaving. We are, though, witnessing a massive refactoring of roles.…

See you at DrupalCon Vienna!

I can't believe it's already time for DrupalCon Vienna! I'll be presenting on Wednesday at 4:15pm with Dripyard's Mike Herchel about How to Land an EPIC Contribution in Drupal (Without Losing Your Mind) . We'll talk about some of the contributions we've been able to get committed together and empower others to team up and fix the quirks and irks they have with Drupal! Over the summer, Acquia…

Simplytest back up and running!

If you've been a user of Simplytest , I've just completed a round of maintenance, and everything should be up and running again. The service must have been spamming the Drupal.org APIs and caused itself to get blocked. I've worked with the DA team, and now Simplytest can make API requests again to get project and release data. Here are a few items tackled:

Learning it's okay to acknowledge you have a disability

For the past few years, I've been struggling to acknowledge that I have a disability. It's not something new. I've grown up this way. I just never called it a disability because I always thought, "Well, it could be worse," or "It's not as bad as others have it". When I was about two, my parents found out I was born with juvenile rheumatoid arthritis (now referred to as juvenile idiopathic…

Why I've self-nominated for the Drupal Association At-Large Board Seat at this moment

I had been considering a self-nomination for the Drupal Association At-Large Board Seat a few times. This year, I decided to throw my hat into the ring. I've been a bit busy with baseball season kicking off (three kids, three teams 🫠) that I haven't written a blog yet, but I will, explaining why I've considered now the right time.

Now on Drupal 11.1

My site is now on Drupal 11.1! I was able to jump from 10.4 to 11.1 without any hiccups. I also used it as a chance to clean up some unused modules instead of upgrading to ones compatible with 11.1 - like media_entity_instagram that I never used and disqus which hasn't been working for a while.

Drupal is delivering innovation beyond major versions

If you caught the State of Drupal presentation (aka Driesnote) from DrupalCon Atlanta , maybe you noticed something missing. There was no news about Drupal 11 or what lies ahead with Drupal 12. Instead, we talked about Drupal CMS, Experience Builder, and the upcoming concept of site templates.

phpstan-drupal now supports PHPStan 2.0

PHPStan 2.0 was released a month ago, a massive milestone for the project. To learn about all the changes, I recommend reading the release announcement . phpstan-drupal now has a PHPStan 2.0 compatible release: https://github.com/mglaman/phpstan-drupal/releases/tag/2.0.0 . The 1.x branch will be maintained as long as a version of Drupal Core uses it, at least until Drupal 10's end-of-life near the…

The Web APIs powering the Drupal CMS trial experience

This blog expands on my DrupalCon Barcelona talk, which I managed to squeeze into a twenty-minute session slot. You can download a copy of my slides . Unfortunately, I could not dedicate enough time to the project and stepped down as the trial track lead. The Drupal CMS trial is no longer based on my WebAssembly work, and an ongoing process is being conducted to provide an official demo.

Restrict Composer dependency updates to only patch releases

I was doing website maintenance and checked for outdated dependencies with composer outdated . I usually filter with -D for checking direct dependencies and -p for packages with patch releases. These are typically easy pickings. I saw I was on 2.1.3 of the Honeypot module and 2.1.4 was available. So I ran composer update drupal/honeypot . I noticed the module was updated to 2.2.0 , because my…

Lenient Composer Plugin officially replaces lenient packages endpoint

Well, it's official. My Drupal Lenient Composer Plugin has allowed the lenient Composer repository endpoint on Drupal.org to be sunset and removed . I created the mglaman/composer-drupal-lenient repository two years ago at DrupalCon Portland. It is pretty wild how much it has been adopted in just two years. Not only has it allowed the Drupal Association to dismantle some infrastructure, but it is…

Next stages for the Drupal Starshot trial experience

Drupal CMS is the official name for Drupal Starshot . We officially have the Drupal CMS project on Drupal.org , where the previous prototype has been converted into the official codebase . This monolithic repository will contain the Composer project and packages (recipes) that makeup Drupal CMS.

Trial experience for Starshot update

Earlier this month, I debuted a way to try out Drupal core and the Starshot prototype running in the browser using WebAssembly . It started as a passion project and fascination with new web technologies, something I had tried a year before but didn't find a fit for. Now, it's officially part of a Starshot initiative track. Here, you can access the trial experience: https://wasm-drupal.mglaman.dev/…

Running Drupal on the Edge with WebAssembly

At DrupalCon Portland, Dries announced Starshot during his State of Drupal presentation. Part of Starshot is the idea that we have Drupal CMS and Core. The big difference is that the Drupal CMS offering comes with standard contributed modules used by almost every existing Drupal build. Then, Dries showed a proposed wireframe for the Drupal.org download page. One of the first things I noticed was…

Starshot, recipe to cook up ambitious Drupal applications

This blog post was inspired by my time at DrupalCon Portland and the Driesnote, announcing Starshot . There has also been a story about Drupal being a series of building blocks for building your own CMS (or other application). Often, it has been compared to building a LEGO® set. The idea is that you have Drupal core and contributed modules, acting as individual pieces, to build an application that…

Writing tests first saves time and money later on

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.