WebformSubmitResource::$entityTypeManager is deprecated

Created on 20 July 2023, over 1 year ago
Updated 8 December 2023, about 1 year ago

Problem/Motivation

Deprecated function: Creation of dynamic property Drupal\webform_rest\Plugin\rest\resource\WebformSubmitResource::$entityTypeManager is deprecated in Drupal\webform_rest\Plugin\rest\resource\WebformSubmitResource::create() (line 52 of modules/contrib/webform_rest/src/Plugin/rest/resource/WebformSubmitResource.php).
Drupal\webform_rest\Plugin\rest\resource\WebformSubmitResource::create(Object, Array, 'webform_rest_submit', Array) (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('webform_rest_submit', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('webform_rest_submit') (Line: 165)
Drupal\restui\Form\RestUIForm->buildForm(Array, Object, 'webform_rest_submit')
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('restui', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583)
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: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 68)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 53)
Asm89\Stack\Cors->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: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

- Install and enable the restui module
- Navigate to /admin/config/services/rest
- Click on the "Enable" link for "Webform Submit"

And you will see the error message.

Proposed resolution

Define the class variable $entityTypeManager

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom miteshmap

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

Comments & Activities

Production build 0.71.5 2024