Use Stringable interface where possible

Created on 13 March 2024, over 1 year ago

Problem/Motivation

There are many Drupal classes which have a ::toString() method but do not implement the PHP Stringable interface. It would be useful if these implemented Stringable.

Proposed resolution

For each class with a ::toString() method, add a ::__toString() method, deprecate the former in favour of the latter, and declare that the class implements Stringable.

Remaining tasks

Agree on this change. Implement.

User interface changes

None.

API changes

Rename of method.

Data model changes

None.

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

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

Comments & Activities

Production build 0.71.5 2024