Skip to content

PHP 8.4 compatibility

Problem/Motivation

Passing E_USER_ERROR to trigger_error() is deprecated since 8.4.

Steps to reproduce

  • Use PHP 8.4
  • Access /admin/config/development/devel?demo=error
  • See deprecation warning

Deprecated function: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in Drupal\devel\Form\SettingsForm->demonstrateErrorHandlers() (line 204 of modules/contrib/devel/src/Form/SettingsForm.php).