Install

Works with Drupal: ^11.1

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 55.08 KB
MD5: 4a5b7ab40cc31a573004a553a19350e8
SHA-1: 903010a82cac3cc11fc84d26c3faa1138d7cb6e0
SHA-256: 6218f805a4027df0b6714343aaf333d2b9d06ac76810af7a9038aede75a93c41
Download zip 84.7 KB
MD5: d9b4b70f338b53badac865f1a2ad4dcd
SHA-1: acea48c929e5b2619519fa188ffcf6dcb685d560
SHA-256: eb9161cb6c95ede1889294acf1c3646417dcdb403cbe099bcea53f4fe79d0b1b

Release notes

The first beta of the 3.x line. From here the plugin APIs, the configuration
shape and the stored data are settled: beta1 is a supported upgrade target and
3.0.0 final will not change them without a deprecation cycle.

Compatibility

  • Requires Drupal 11.1 or later. The module's hook implementations are `#[Hook]` attribute classes, which Drupal only discovers from 11.1. Earlier 3.0 alphas claimed `^10.2 || ^11 || ^12`; that was wrong in both directions and is corrected here.
  • PHP 8.1 or later, per Drupal 11.1's own requirement.
  • Drupal 12 is not declared. The code is prepared for it — the ECA action plugins implement the core `ExecutableInterface` signature and the settings are schema-complete — but `key`, a hard dependency, has no Drupal 12 release, so the module cannot be installed there yet. See #3606457: Automated Drupal 12 compatibility fixes for matrix_api 3.0.x-dev.
  • Requires the Key module (`drupal/key ^1.0`).

Breaking changes from 2.x

  • The access token is stored in a Key entity. `drupal/key` is a hard dependency. The plugin loads it from the entity named by the new `matrix_api.key_id` setting instead of a plain config string, and the settings form has moved to a `key_select` element with a generate-token fieldset.
  • `matrix_api.token` and `matrix_api.password` are gone from the settings configuration.
  • `matrix_api.matrixhttp` was removed. It was an internal Guzzle client factory exposed as a service. Nothing should have depended on it, but any custom code that did must resolve its own HTTP client.
  • Code that read the old settings must be updated.

Replace

  \Drupal::config('matrix_api.MatrixApiSettings')->get('matrix_api.token')

with

  $keyId = \Drupal::config('matrix_api.MatrixApiSettings')->get('matrix_api.key_id');
  $token = $keyId ? \Drupal::service('key.repository')->getKey($keyId)?->getKeyValue() : NULL;

Upgrading from 2.x

  1. `composer require drupal/matrix_api:^3.0-beta1`. This pulls in `drupal/key`.
  2. drush updb` (or `drush updatedb`). `matrix_api_update_3001()` installs the Key module if needed, moves an existing `matrix_api.token` into a Key entity named `matrix_api_access_token`, and clears the old keys. A site that stored only a password has nothing to migrate and will log a warning; re-enter credentials at `/admin/config/services/matrix-api`.
  3. Re-check any ECA model that used the removed `matrix_api.matrixhttp` service.

Upgrading from an earlier 3.0 alpha needs no data migration: this is a pre-release, and no alpha has been in production use.

New in 3.0

  • Matrix client. `MatrixClientInterface` covers joining and leaving rooms, sending messages and thread replies, redacting events, reading and writing room state, and reading room history. The text version of a reply is stripped of formatting, and `formatted_body` is exposed for the HTML version.
  • ECA event. `matrix_api:event_received` fires for every inbound Matrix event, with tokens for `event_id`, `room_id`, `sender`, `type`, `state_key`, `body`, `formatted_body`, `thread_root` and `in_reply_to`.
  • ECA actions. Send a message, send a thread reply, set room state, redact an event, and trigger a non-blocking inbound poll. Send-message and send-thread-reply can store their result `event_id` and the resolved `room_id` into ECA tokens (`result_token`, `room_result_token`).
  • Inbound synchronisation is a plugin type. `cron_poller` polls `/sync` on cron; `matrix_api:sync-daemon` runs a long-lived Drush daemon for sites that would rather not poll from a web request. Other transports can be added as plugins.
  • Config action. `setupMatrixCredentials` provisions a Key entity from a recipe, so a site can be configured without an administrator.
  • Rules action `SendMatrixMessage` is retained for Rules 1 sites.

Fixed in 3.0.0-beta1

Known issues

  • Drupal 12 support is implemented but not declared, pending a `key` release for Drupal 12.
  • The Rules action needs the unmaintained Rules module, which has no Drupal 11 release. ECA is the supported path.
Created by: freelock
Created on: 29 Sep 2026 at 22:45 UTC
Last updated: 29 Sep 2026 at 22:50 UTC
Bug fixes
New features

Other releases