TypeError: Drupal\cas\DependencyInjection\DeprecatedEventConstants

Created on 18 March 2025, about 2 months ago

Problem/Motivation

When installing the CAS module, this WSOD error appears:

TypeError: Drupal\cas\DependencyInjection\DeprecatedEventConstants::Drupal\cas\DependencyInjection\{closure}(): Return value must be of type string, Symfony\Component\DependencyInjection\Reference returned in Drupal\cas\DependencyInjection\DeprecatedEventConstants->Drupal\cas\DependencyInjection\{closure}() (line 58 of modules/contrib/cas/src/DependencyInjection/DeprecatedEventConstants.php).

The error pops-up everytime we try to clear cache: drush cr

The only way to get cache rebuild again is to uninstall the module CAS.

PHP: 8.2.24
Drupal: 10.4.4

30 step stack:

array_map() (Line: 58)
Drupal\cas\DependencyInjection\DeprecatedEventConstants->Drupal\cas\DependencyInjection\{closure}() (Line: 40)
Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall() (Line: 55)
Drupal\cas\DependencyInjection\DeprecatedEventConstants->process() (Line: 80)
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() (Line: 767)
Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1449)
Drupal\Core\DrupalKernel->compileContainer() (Line: 972)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 854)
Drupal\Core\DrupalKernel->updateModules() (Line: 627)
Drupal\Core\Extension\ModuleInstaller->updateKernel() (Line: 248)
Drupal\Core\Extension\ModuleInstaller->install() (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install() (Line: 504)
Drupal\system\Form\ModulesListForm->submitForm()
call_user_func_array() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

The module

πŸ› Bug report
Status

Active

Version

3.0

Component

CAS

Created by

πŸ‡΅πŸ‡ΉPortugal jrochate

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024