Skip to content

Please let's have null-safe version of Twig extension #76

@ostrolucky

Description

@ostrolucky

Since 3.0, parameter was typehinted to string, which breaks stuff for everybody passing null there. Nullable getters are very widespread, please don't make us do
{{ activity.getNote ? activity.getNote|purify }} on each instance. It's fine this typehint is present in HTMLPurifierRuntime, but twig filter should be a closure typehinted to ?string that shouldn't pass null along to HTMLPurifierRuntime

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions