Allow converting objects of class StringData to strings

Created on 2 September 2016, over 8 years ago
Updated 31 January 2023, almost 2 years ago

I was really surprised to get the following error when I casted a StringData object to a string:

Fatal Error: Object of class Drupal\Core\TypedData\Plugin\DataType\StringData could not be converted to string

Let's allow this to get casted to a string already.

Feature request
Status

Closed: outdated

Version

10.1

Component
Typed data 

Last updated 16 days ago

  • Maintained by
  • 🇦🇹Austria @fago
Created by

🇧🇬Bulgaria pfrenssen Sofia

Live updates comments and jobs are added and updated live.
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.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    Closing as outdated as getCastedValue() already returns $this->getString();

Production build 0.71.5 2024