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

-

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

efpapado created an issue. See original summary.

efpapado’s picture

Status: Active » Needs review
dahousecat’s picture

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.

benstallings made their first commit to this issue’s fork.

benstallings’s picture

Status: Needs review » Reviewed & tested by the community

I just rebased it ^

achton made their first commit to this issue’s fork.

achton’s picture

Thanks efpapado for the fix, and dahousecat and benstallings for testing and rebasing.

I rebased the merge request onto 2.x, which now has GitLab CI (#3634607: Add GitLab CI and composer.json), and added one commit: a conflict with drupal/queue_ui before 3.2 in composer.json. The new signature is incompatible with Queue UI 3.1.x, so Composer should keep sites from combining them.

The ContainerAwareTrait error from comment #3 is fixed in #3434069: Automated Drupal 11 compatibility fixes for queue_stats.

I plan to merge this once the pipeline passes, for 2.0.0-rc1.

achton’s picture

Assigned: Unassigned » achton
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • achton committed df0ced6b on 2.x authored by efpapado
    fix: #3482659 MonitoredQueueUIManager::queueClassName() is incompatible...