Use MessengerInterface instead of Messenger

Created on 20 June 2024, 8 days ago

Problem/Motivation

When releasing an item in the queue using the release button we get the following error

TypeError: Drupal\queue_ui\Form\ConfirmItemReleaseForm::__construct(): Argument #1 ($messenger) must be of type Drupal\Core\Messenger\Messenger, Drupal\admin_toolbar_messages\AdminAwareMessenger given, called in /var/www/html/app/modules/contrib/queue_ui/src/Form/ConfirmItemReleaseForm.php on line 65 in Drupal\queue_ui\Form\ConfirmItemReleaseForm->__construct() (line 49 of modules/contrib/queue_ui/src/Form/ConfirmItemReleaseForm.php).
Drupal\queue_ui\Form\ConfirmItemReleaseForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\queue_ui\Form\ConfirmItemReleaseForm') (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\queue_ui\Form\ConfirmItemReleaseForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
include('/var/www/html/app/index.php') (Line: 3)

Steps to reproduce

  1. Install the module admin_toolbar_messages
  2. Install the Queue_ui module
  3. Create an item in the queue
  4. Try to release the item through the interface

Proposed resolution

"program to an interface not an implementation"

See patch

Remaining tasks

Test and merge

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

3.1

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands adebruin

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024