Skip to main content

Preparing File Upload Secure Validator for Drupal 12 with AI

Photo of Stefanos Petrakis
Stefanos Petrakis - Drupal developer
March 18, 2026

At Tag1, we believe in proving AI within our own work before recommending it to clients. This post is part of our AI Applied content series, where team members share real stories of how they're using Artificial Intelligence and the insights and lessons they learn along the way. Here, Stefanos Petrakis, maintainer of the File Upload Secure Validator module, shows how he used AI to modernize a small but widely used Drupal security module and prepare it for Drupal 12.

From "I'll Get to It" to Done: Modernizing File Upload Secure Validator

I’ve been meaning to clean up the File Upload Secure Validator project and get it ready for Drupal 12 for a while now. This small, focused module has been around for nearly a decade. Despite its simplicity, it continues to serve more than 10,000 reported sites, and adoption has only accelerated with the introduction of Drupal AI. With the help of Cline and Claude, I finally did a full overhaul of the codebase: switching to Drupal 11-only support, expanding the automated test suite, and positioning the project for Drupal 12.

Graph showing Drupal usage over time and reflecting an increase since the release of Drupal AI.
Figure 1: Weekly File Upload Secure Validator usage report, that refects an increase in usage post Drupal AI release.

A Decade-Old Module Meets Drupal 12

This was the kind of maintenance work I kept putting off, the same feeling I get when I need to sit down and do my taxes. I knew the project needed cleanup and modernization, but I wanted a little push and some company in doing the work. The missing motivation and sense of camaraderie were, in many ways, the biggest challenges.

On top of that, I had a clear vision for how I wanted to extend the test suite, and I knew it would be time-consuming. Time, or the lack of it, was a major factor, especially for this kind of detailed, behind-the-scenes work on an open source module.

Turning a Wish List Into a Working Plan

To move things forward, I turned to Cline and Claude to help plan the future of the module. I started by writing down a list of "wishes" for the project: the improvements I wanted to see in the code, tests, and overall quality.

Cline turned that list into a detailed execution plan. It also generated questions about the approach, which led us into a few iterations before we settled on the final course of action. That planning process gave structure to the work and made it much easier to tackle in focused sessions.

All of the changes happened in the project's repository on the 2.2.x branch, with the final result released as version 2.2.1 on Drupal.org.

From Red CI Pipelines to Green Across the Board

Before this overhaul, the project had accumulated a number of issues:

  • Multiple GitLab CI failures
  • Drupal 11.3+ deprecation warnings
  • Unit test failures (including static method and TranslatableMarkup issues)
  • Limited test coverage
  • 383+ PHPCS violations
  • CSpell errors
  • PHPStan attribute errors

After the overhaul, the picture looks very different:

  • All GitLab CI tests passing
  • Zero deprecation warnings
  • 23 tests with 164 assertions
  • 0 PHPCS errors and 0 warnings
  • 0 CSpell errors
  • 0 PHPStan errors
  • 100% CI quality checks passing

This overhaul gave me the "manpower" and momentum I was missing to push the project forward. Just as importantly, it gave me confidence that I can continue supporting this module in the future.

AI-Amplified Maintenance for Critical Dependencies

Maintaining and supporting open source libraries can often become demanding because of limited time and resources. In client projects, dependencies on under-maintained open source projects can increase the effort required to maintain or upgrade the client's own platform.

Partners like Cline and Claude can change the game in an advantageous way. Such a change can help teams keep critical open source dependencies up to date, improve quality, and reduce risk without requiring a huge amount of extra human capacity.

This post is part of Tag1’s AI Applied content series, where we share how we're using AI inside our own work before bringing it to clients. Our goal is to be transparent about what works, what doesn’t, and what we are still figuring out, so that together, we can build a more practical, responsible path for AI adoption.

Bring practical, proven AI adoption strategies to your organization, let's start a conversation! We'd love to hear from you.

Work With Tag1

Be in Capable Digital Hands

Gain confidence and clarity with expert guidance that turns complex technical decisions into clear, informed choices—without the uncertainty.