Problem/Motivation

TypeError thrown from from prometheus_dispatch_event on Drupal 10.

Steps to reproduce

Problem was discovered when running drush updb after upgrading to Drupal 10.
TypeError was thrown from prometheus_metrics when running ckeditor5 updates and it was not possible to finish running the updates.
However it can also be recreated on simpler operations such as drush ucrt TestUser.

Proposed resolution

The error occurs because the order prometheus_dispatch_event passes the arguments to $eventDispatcher->dispatch() is no longer correct when running on Drupal 10. The quickest fix is to catch the TypeError exception and resubmit the function call with the reversed arguments.

Remaining tasks

Write a patch implementing the above fix. (DONE - Attached to issue).
Test the patch.
Merge to a new version of module.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Griff Phillips created an issue. See original summary.

deranga’s picture

Status: Active » Reviewed & tested by the community

Thanks Griff. I'll get this committed and released as soon as possible.

  • 7fd7dcac committed on 1.0.x
    Issue #3379778 by Griff Phillips: TypeError from...
deranga’s picture

Status: Reviewed & tested by the community » Fixed

New release available for this issue.

deranga’s picture

Status: Fixed » Closed (fixed)