Skip to content

Don't use Twig CodeExtension helpers outside of a profiler panel #1455

Closed
@GromNaN

Description

@GromNaN

The CodeExtension Twig extension moved to the WebProfilerBundle symfony/symfony#52483.

This extension should only be used for debugging tools code that is never executed in a production environment.

This demo uses the format_file helper even in prod environment.

<p class="file-link">{{ controller.file_path|format_file(controller.starting_line) }}</p>

Even if it's very convenient and specific to this demo, we'd have to find another solution.

Demo needs to adjust, we don't want to support such use cases.
symfony/symfony#52531 (comment)

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