[META] Replace E_USER_WARNING with Exception Handling for Edge Cases in Error Reporting

Created on 28 November 2024, 5 months ago

Problem/Motivation

Following the initial patch replacing E_USER_ERROR with E_USER_WARNING, this follow-up aims to evaluate and implement a consistent approach to error handling. Specifically, we will consider replacing E_USER_WARNING instances with exceptions or other suitable error management strategies to balance system stability with user feedback, particularly in extreme edge cases. This issue will help finalize the best approach for addressing deprecated error-level usage in line with PHP 8.4 compatibility requirements.

Steps to reproduce

See merge request from 📌 Stop passing E_USER_ERROR to trigger_error() on PHP 8.4 Active

Proposed resolution

File separate issues for each case
- Deprecate ToStringTrait and replace its usages, clean-up Phpstan baseline
- add error logging to core/modules/big_pipe/src/Render/BigPipe.php
- throw exception in core/lib/Drupal/Component/Diff/DiffFormatter.php

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Active

Version

11.0 🔥

Component

base system

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024