Getting deprecated function: calling static trait method when creating a new model with PHP 8.1
I've installed a fresh version of Drupal 9.4.1 with ECA RC1 and bpmn_io RC1 (btw RC1 isn't listed in the dropdown list of available versions for this issue yet -> selected beta12 but the issue is about RC1 and I've tested only with that version). I've used Claro as the admin theme. I've used nginx/1.22.0, PHP 8.1.6 and MariaDB 10.5.16 with DDEV. I've installed all modules in the ECA section on the extend page except ECA Entity Share Client and Entity Share Server. On admin/config/workflow/eca I've created a new model. I ran into the following issue (tested with Safari 13.1.2 and Firefox 101.0.1 with identical results):
I am unable to copy and paste the output directly from the error message on the new model page. I am unable to select the text. The two error messages shown look the same. Therefor I've only copied the error once from the recent log messages page:
Location: https://eca.ddev.site/admin/config/workflow/eca/add/bpmn-io
Referrer:
Message:
Deprecated function: Calling static trait method Drupal\eca\Service\ServiceTrait::convertKeyToLabel is deprecated, it should only be called on a class using the trait in Drupal\eca_modeller_bpmn\ModellerBpmnBase->prepareConfigFields() (line 736 of /var/www/html/web/modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php)
#0 /var/www/html/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8192, 'Calling static ...', '/var/www/html/w...', 736)
#1 /var/www/html/web/modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php(736): _drupal_error_handler(8192, 'Calling static ...', '/var/www/html/w...', 736)
#2 /var/www/html/web/modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php(588): Drupal\eca_modeller_bpmn\ModellerBpmnBase->prepareConfigFields(Array)
#3 /var/www/html/web/modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php(538): Drupal\eca_modeller_bpmn\ModellerBpmnBase->properties(Object(Drupal\eca_config\Plugin\ECA\Event\ConfigEvent), 'event', 'bpmn:Event', Array)
#4 /var/www/html/web/modules/contrib/bpmn_io/src/Plugin/ECA/Modeller/BpmnIo.php(74): Drupal\eca_modeller_bpmn\ModellerBpmnBase->getTemplates()
#5 /var/www/html/web/modules/contrib/bpmn_io/src/Controller/BpmnIo.php(61): Drupal\bpmn_io\Plugin\ECA\Modeller\BpmnIo->edit()
#6 [internal function]: Drupal\bpmn_io\Controller\BpmnIo->add()
#7 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#8 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#22 {main}
I've tested the same steps with PHP 8.0 and the deprecation error hasn't shown there. If I switch back to PHP 8.1.6 the error is back. And in regards the display of the error message I've linked two related issue. https://www.drupal.org/project/bpmn_io/issues/3279961 seems at least in the context of this issue still be problematic.
