acquia / blt

Acquia's toolset for automating Drupal 10 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

Respect PHP and Drupal error logging #4703

Open grasmash opened 9 months ago

grasmash commented 9 months ago

Is your feature request related to a problem? Please describe. I found it very confusing that despite configuring both Drupal and PHP to NOT display deprecation warnings, I continued to see them locally. I wasted a good bit of time discovering https://github.com/acquia/blt/blob/main/settings/logging.settings.php#L18 which completely overrides those settings. This feels a bit heavy handed.

Describe the solution you'd like At the least, prominently document this behavior. Ideally it should be displayed at run time in the error log. If I saw a notice in the error log that said something like "BLT has set error_reporting to E_ALL" then I would have resolved the issue much faster.

Describe alternatives you've considered Alternatively, we could just stop overriding the error level.

grasmash commented 9 months ago

This would be good:

error_log("BLT is overriding the error_reporting, display_errors, and display_startup_errors settings in logging.settings.php.");

But only if it doesn't execute for every single PHP process. Not sure if there's away to do it less frequently, like only when cache is cleared.