Deprecated function: Creation of dynamic property Drupal\queue_ui\Form\ItemDetailForm::$renderer is deprecated in Drupal\queue_ui\Form\ItemDetailForm->__construct() (line 38 of modules/contrib/queue_ui/src/Form/ItemDetailForm.php).

Created on 24 October 2023, about 1 year ago
Updated 1 February 2024, 10 months ago

Problem/Motivation

Deprecated function: Creation of dynamic property Drupal\queue_ui\Form\ItemDetailForm::$renderer is deprecated in Drupal\queue_ui\Form\ItemDetailForm->__construct() (line 38 of modules/contrib/queue_ui/src/Form/ItemDetailForm.php).

Due to PHP 8.2 being more strict about this.

Steps to reproduce

Visit admin/config/system/queue-ui/{queue}/view/{item_id} and this warning appears. We should probably review the rest of the module's code as well to make sure this is the only place.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @heddn
  • Assigned to mohd sahzad
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    2 pass
  • 🇮🇳India mohd sahzad

    I have updated this issue please review patch 1

  • Status changed to RTBC about 1 year ago
  • heddn Nicaragua

    Looks good. LGTM.

  • Status changed to Needs work about 1 year ago
  • After applying the patch, I still get this when inspecting a queue item:

    Deprecated function: Creation of dynamic property Drupal\queue_ui\Form\ItemDetailForm::$moduleHandler is deprecated in Drupal\queue_ui\Form\ItemDetailForm->__construct() (line 46 of modules/contrib/queue_ui/src/Form/ItemDetailForm.php).
    Drupal\queue_ui\Form\ItemDetailForm->__construct(Object, Object, Object) (Line: 58)
    Drupal\queue_ui\Form\ItemDetailForm::create(Object) (Line: 28)
    Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\queue_ui\Form\ItemDetailForm') (Line: 48)
    Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\queue_ui\Form\ItemDetailForm') (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: 592)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
    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: 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: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    2 pass
  • Status changed to Needs review about 1 year ago
  • I created a merge request. I added the additional missing property, and I fixed some things in the same file for coding standards.

    I did notice a lot of other files that don't have proper coding standards, but I didn't want to touch every file.

    Some things I noticed:

    • @inheritdoc comments shouldn't have anything else in the doc comment. Multiple places did, though.
    • use statements should be sorted.
    • There should be a blank line in empty function declarations.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    2 pass
  • Status changed to Fixed 10 months ago
  • 🇧🇪Belgium bceyssens Genk 🇧🇪
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024