Wednesday, September 28, 2022

Webprofiler and settings.local.php

I didn't realise the Webprofiler module has now been spun out of Devel. Took me ages to realise that some of my local dev sites failing was because the recommended Drupal 9 snippet for settings.local.php was failing.

  1. Update the Devel module. 
  2. Then install Webprofiler module
  3. Change your relevant settings.local.php snippet to include:

// Webprofiler settings
$class_loader->addPsr4('Drupal\\webprofiler\\', [ $app_root . '/modules/contrib/webprofiler/src']);
$settings['container_base_class'] = '\Drupal\webprofiler\DependencyInjection\TraceableContainer';