Skip to content

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

Closed

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

Activity

  1. added this to the 3.0 milestone on May 27, 2020
  2. added a commit that references this issue on Sep 16, 2020
  3. added a commit that references this issue on Sep 18, 2020
  4. HeahDude commented on Sep 18, 2020

    @HeahDude
    Collaborator

    3.0.1 is now released, closing here, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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