diff -u b/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php --- b/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -739,7 +739,7 @@ protected function enableModules(array $modules) { $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); if ($trace[1]['function'] === 'setUp') { - trigger_error('KernelTestBase::enableModules() should not be called from setUp(). Use the $modules property instead.', E_DEPRECATED); + trigger_error('KernelTestBase::enableModules() should not be called from setUp(). Use the $modules property instead.', E_USER_DEPRECATED); } unset($trace);