Skip to content

[String] allow string to be constructed with null #38260

Closed
@kbond

Description

@kbond

Description
Just recently started really using the component and am finding it annoying that a string can't be constructed with null (think nullable entity fields). Maybe at least the helper functions? I wanted to gauge interest before submitting a PR.

There was a PR accepted to allow this for the Twig StringExtension (twigphp/Twig#3259).

Example
Instead of s((string) $possibleNullString), it would be nice to just do s($possibleNullString).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions