Skip to content

Cannot add runtime filter/functions #24

Description

@pinkeen

I am using the bundle with assetic integration.

When I introduce a new filter/function to a template then when doing assetic:dump TwigJS produces an error indicating that a filter/function is missing and refuses to compile the template.

This way the template won't even reach the "runtime" phase when I can register the used filter/function.

UPDATE:
I did a bit of research and it seems that in order to define any compile time/runtime filters/functions they have to be already present in Twig to avoid the compilation error. Is this an intended behavior? It seems a bit illogical to me. Even if haven't used TwigJS for Single Page App I can imagine plenty of situation when you want some filters/functions in JS which don't belong to standard PHP Twig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions