Drupal Contribution Notes, 24–30 November 2026: Drupal 12 Tests Pass, Digital Locker 2.1.2 and Azure AI Speech

Drupal Contribution Notes, 24–30 November 2026: Drupal 12 Tests Pass, Digital Locker 2.1.2 and Azure AI Speech

Drupal 12 launches on 7 December, so in the week before it I made sure the modules I maintain are ready. AI Empathy 1.6.0 and Digital Locker 2.1.2 are out, both tested on Drupal 12, and PWA Firebase Notification is one review away from a stable 2.0.0. I also added Azure AI Speech support to the Azure provider. Here is what shipped, what got merged and what comes next.

AI Empathy 1.6.0: the Drupal 12 tests pass

Last week I wrote a plan to make AI Empathy ready for Drupal 12. Three of its four parts are now merged into the 1.6.x branch:

  • The Drupal 12 tests run (#3616694). They used to stop before a single test ran, because some dependencies could not be installed on Drupal 12. AI Agents now declares Drupal 12 on its 1.4.x branch. AI Context is tested from its Drupal 12 issue branch until that is released.
  • Deprecations are no longer hidden (#3616695). CI had been suppressing deprecation warnings, and deprecated APIs are exactly what the next major version removes. Turning them back on showed two in AI Empathy's own code, both now fixed. The deprecations that come from dependencies are listed in a .deprecation-ignore.txt file, so they are ignored on purpose and are easy to remove once each dependency is fixed.
  • Every scenario pack is tested (#3616696). The finance, healthcare and HR packs must each install with enabled scenarios and schema-valid configuration, uninstall cleanly with their scenarios, and install again.

All of this shipped in AI Empathy 1.6.0 on 30 November, together with the Australian AI governance policies. The fourth part, using AI Context's shared test helpers, is waiting for AI Context 1.1.0.

Digital Locker 2.1.2: safer document fetching

Digital Locker 2.1.2 completes last week's plan for the Requester, the module that lets someone attach a document from their own DigiLocker account to a file field:

  • Documents go where the field says (#3287003). A fetched document is now saved in the field's own upload location, so a field set to private storage keeps it private. The DigiLocker button is signed for its field, and the status report warns about any DigiLocker field that stores files publicly.
  • Only PDFs are accepted (#3287005). A fetched file that is not really a PDF is refused and never saved.
  • Secrets can live in settings.php (#3287004). Configuration is usually exported and committed, which is the wrong place for a secret key. The requester secret key and the issuer API key and certificate passphrase can now be set in settings.php, which wins over configuration.
  • The Requester has tests (#3287006). They cover bad input, DigiLocker failures, unsafe XML, oversized and non-PDF documents, filename cleaning and the widget.

If you use the Requester, please update. After updating, check the status report: if it warns about a DigiLocker field, move that field to private storage, because these are identity documents.

PWA Firebase Notification: one review from 2.0.0

Every test of PWA Firebase Notification already passed on Drupal 12. The last two pieces before a stable 2.0.0 are now ready for review: a list of the Drupal 12 deprecations raised by core and ECA (#3235409), and tests for the Rules action that sends a push notification (#3235410). Rules has no Drupal 12 release yet, so those tests are skipped on Drupal 12. The ECA action covers the same job there.

Azure provider: text to speech with Azure AI Speech

Andrew Tur reported that text to speech failed with "Resource not found" (#3575716). The cause: the Azure provider spoke only to Azure OpenAI, but the endpoint belonged to Azure AI Speech, a different service with a different request format.

The merge request adds Azure AI Speech support. With a .../cognitiveservices/v1 endpoint, the provider sends the text as SSML, asks for the audio format you chose, and sends the key in the header Speech expects. The voice setting is now free text, so you can use any Azure voice, such as en-US-AvaMultilingualNeural. Azure OpenAI works as before. These are also the first automated tests in the module. If you use Azure AI Speech, please try the merge request and comment on the issue.

Drupal 12 lessons from this week

  • Drupal 11.5 deprecates code in .module files. Only hook functions marked #[LegacyHook] may stay. Move helper functions into your hook classes. A form's #entity_builders accepts a [ClassName::class, 'method'] callable, so entity builders can move too.
  • Check that the Drupal 12 jobs actually ran. In the GitLab CI templates the "next major" jobs can be manual. A pipeline can show green without running a single Drupal 12 test, so start composer (next major) yourself.
  • Don't compare a dev version with version_compare(). version_compare('12.0-dev', '12.0', '>=') is false, so a check for Drupal 12 fails on Drupal 12's own dev branch. Compare the major version instead: (int) \Drupal::VERSION >= 12.
  • #[CoversClass] loads the class. If the class cannot load on Drupal 12, for example because its dependency has no Drupal 12 release, the test fails before it can skip itself. Use #[CoversNothing] in that case.
  • Still supporting Drupal 10? Drupal 10 uses PHPUnit 9, which reads @group and @dataProvider annotations, not attributes. Keep both, and tell PHPStan to ignore the attribute classes it cannot find on Drupal 10.

New video: Drupal CMS and Canvas, start to finish

Alongside the module work, I recorded a walkthrough of Drupal CMS 2.2 and Drupal Canvas: installing with a site template, building and publishing a page without code, saving a pattern and writing a small React code component, plus where Drupal 12 fits. Watch the Drupal CMS and Canvas walkthrough.

What comes next

  • AI Empathy: switching its Context Control Centre tests to AI Context's shared helpers, once AI Context 1.1.0 is out.
  • PWA Firebase Notification 2.0.0, once the two merge requests are reviewed.
  • Azure AI Speech: testing on real Speech resources, then a review.
  • Upgrading this site to Drupal 12. fernandesjoshua.com runs Drupal 11.4, and I plan to upgrade it with Upgrade Status and Rector, then share what it took.

Thank you to Andrew Tur for a clear report and for testing in Postman first, which made the cause easy to find. If you maintain a contrib module, this is a good week to run its Drupal 12 jobs. Comment on any of the issues above if one of them covers something you need.

If your team is preparing Drupal sites or modules for Drupal 12, or building with Drupal AI, I am happy to help, and to connect you with my team at Axelerant to help you reach your goal. Get in touch.