Closed GromNaN closed 11 months ago
This demo could create its own filter demo_format_file
copying the implementation from the core if needed, with a big warning on that class telling that you should not actually deploy this in a production project. This should go in the existing SourceCodeExtension
of the demo.
I added the helper to the existing SourceCodeExtension, which already has a warning comment. https://github.com/symfony/demo/pull/1456
The CodeExtension Twig extension moved to the WebProfilerBundle https://github.com/symfony/symfony/pull/52483.
This demo uses the
format_file
helper even in prod environment. https://github.com/symfony/demo/blob/206f0c9aab07cdc9f7437640b12947d35e9d5e72/templates/debug/source_code.html.twig#L33Even if it's very convenient and specific to this demo, we'd have to find another solution.