Skip to content

Twig Extractor Fails If Any Custom Extensions Used #4

@darkphoenixff4

Description

@darkphoenixff4

Yeah, that's basically it. Because the Twig extractor can't be passed an instance of Twig to use, it always creates one with no extensions loaded, and then throws an error if it hits any custom extension items of any kind.

I tried to get around it by copying the task itself and changing it to fetch Twig from a container so I can hand it my Laravel container to get Twig out of, but that leads to a whole new set of problems; since the PHP reader tries to include any PHP file it finds before it reads it for the functions, forcing the container to load crashes that extractor with a "duplicate class" error, because it tries to load the class, even thought the container already loaded it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions