Deprecate ToStringTrait

Created on 26 September 2025, about 1 month ago

Problem/Motivation

The trait was used for workaround of PHP bug which is fixed since 7.4 https://3v4l.org/5ZJ2i
It has only 2 usages and DTP already has issue #2828835: Drupal DateTime have no render to json_encode

Steps to reproduce

Follow-up from #3465827-5: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4

Proposed resolution

- deprecate the trait or wait for 12.x
- fix usage

Remaining tasks

- patch
- review
- commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

base system

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
  • PHP 7.4

    The issue particularly affects sites running on PHP version 7.4.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024