• Submitted by fm56 on
  • Last updated by fm56 on Tue, 07/21/2026 - 11:30

By default DDev sites will spam both the CLI and the browser with deprecation warnings. Follow these steps to turn them off. 

  1. Make sure the constraint for platformsh/config-reader is ^3.0.
  2. .ddev/php/php.custom.ini ("custom" can be whatever you like):

    [PHP]
    error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
     
  3. web/sites/default/settings.local.php

    <?php
    $config['system.logging']['error_level'] = 'some';
      if (PHP_SAPI === 'cli') {
        error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
          set_error_handler(function ($severity, $message, $file, $line) {
            if ($severity === E_DEPRECATED || $severity === E_USER_DEPRECATED) {
              return true;
            }
            return false;
          });
    }
     
  4. .ddev/config.yaml:

    web_environment:
      - SYMFONY_DEPRECATIONS_HELPER=disabled
     
  5. ddev restart