Skip to content

Instantly share code, notes, and snippets.

@alOneh
Last active February 14, 2018 16:35
Show Gist options
  • Save alOneh/bcdf87ee076e7bee8ddc14c3883f2d94 to your computer and use it in GitHub Desktop.
Save alOneh/bcdf87ee076e7bee8ddc14c3883f2d94 to your computer and use it in GitHub Desktop.
Little script to retrieve the templates used in you Symfony App
#!/bin/bash
# escape the slash in document root
DOCUMENT_ROOT=\/var\/www\/html\/
SYMFONY_ENV=dev
# The full path is written by the Twig compiler, generally at the end of the cache file in the getSourceContext() method
grep -RhoP "${DOCUMENT_ROOT}.*\.html\.twig" app/cache/${SYMFONY_ENV}/twig/ | grep -v vendor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment