Skip to content

Conversation

@EvanLovely
Copy link
Member

When a Twig template contains a namespace powered path like {% include "@atoms/buttons/button.twig" %} and the file is not present, then there is no error thrown currently and the outputted Pattern simply contains this:

2016-10-12 at 2 29 pm

Silent errors are the worst. This is caused by Twig_Loader_String being the last Twig Loader in the Twig_Loader_Chain and will try to render anything thrown at it and is simply doing that above. This PR ensures that if any rendered result starts with @, then an error is thrown. I consider it a stopgap until Twig_Loader_Chain is removed as it is currently deprecated and even contains the internal note to "NEVER use".

@EvanLovely EvanLovely merged commit e1dec43 into master Oct 12, 2016
@EvanLovely EvanLovely deleted the feature/error-on-uncompiled-pattern branch October 12, 2016 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants