Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code using deprecated Symfony Event class #927

Closed
seth-shaw-asu opened this issue Feb 9, 2023 · 1 comment
Closed

Fix code using deprecated Symfony Event class #927

seth-shaw-asu opened this issue Feb 9, 2023 · 1 comment

Comments

@seth-shaw-asu
Copy link
Member

Way back in Drupal 9.1 they deprecated the Symfony Event class. The update required swapping arguments in the dispatch function. So, our site still works with D9 but will fail with D10. The JWT module just fixed this for themselves last week with their 1.1 release.

More immediately, however, enabling the current standalone version of webprofiler will cause the site to choke on the deprecation; e.g.:

[error] 19883#19883: *139901 FastCGI sent in stderr: "PHP message: TypeError: Argument 1 passed to "Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()" must be an object, string given. in /var/www/html/drupal/web/modules/contrib/webprofiler/src/EventDispatcher/TraceableEventDispatcher.php on line 84 #0 /var/www/html/drupal/web/modules/contrib/islandora/src/EventGenerator/EmitEvent.php(163): Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher->dispatch()
#1 /var/www/html/drupal/web/core/lib/Drupal/Core/Action/ActionBase.php(22): Drupal\islandora\EventGenerator\EmitEvent->execute()
#2 /var/www/html/drupal/web/core/modules/system/src/Entity/Action.php(129): Drupal\Core\Action\ActionBase->executeMultiple()
#3 /var/www/html/drupal/web/modules/contrib/islandora/src/PresetReaction/PresetReaction.php(59): Drupal\system\Entity\Action->execute()
#4 /var/www/html/drupal/web/modules/contrib/islandora/src/IslandoraUtils.php(329): Drupal\islandora\PresetReaction\PresetReaction->execute()
#5 /var/www/html/drupal/web/modules/contrib/islan" while reading response header from upstream, server: keep-qa.lib.asu.edu, request: "POST /node/172545/edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "keep-qa.lib.asu.edu", referrer: "https://keep-qa.lib.asu.edu/node/172545/edit"

Using the current version of webprofiler requires a fix now.

Side-note: if you enable webprofiler you are likely to get similar errors for other out-of-date modules. Both facets and workbench_email needed updates to work.

@jordandukart
Copy link
Member

Fixed in #928.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants