Fatal error: MonitoredQueueUIManager::queueClassName($queue) not compatible with QueueUIManager::queueClassName

Created on 23 October 2024, 6 months ago

Problem/Motivation

After upgrading queue_ui from 3.1.4 to 3.2.1, queue_stats throws a fatal error:

Fatal error: Declaration of Drupal\queue_stats\MonitoredQueueUIManager::queueClassName($queue) must be compatible with Drupal\queue_ui\QueueUIManager::queueClassName(Drupal\Core\Queue\QueueInterface $queue): ?string in web/modules/contrib/queue_stats/src/MonitoredQueueUIManager.php on line 19

Steps to reproduce

Upgrade queue_ui from 3.1.4 to 3.2.1 while having queue_stats installed.

Proposed resolution

Update code.

Remaining tasks

Create patch.

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇴Norway efpapado

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @efpapado
  • Merge request !4Fix method. → (Open) created by efpapado
  • Status changed to Needs review 13 days ago
  • 🇬🇧United Kingdom dahousecat

    Patch applied cleanly and fixed the error, but the then I got this error upon enabling the module:

    PHP Fatal error:  Trait "Symfony\Component\DependencyInjection\ContainerAwareTrait" not found in /var/www/html/web/modules/contrib/queue_stats/src/Plugin/QueueStatistic/EstimatedTimeToFinish.php on line 22
    

    I replaced

    use Symfony\Component\DependencyInjection\ContainerAwareTrait;

    with

    use League\Container\ContainerAwareTrait;

    in EstimatedTimeToFinish.php and now it works.

Production build 0.71.5 2024