Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'strict_variables' option to make Foil thrown exception when a required variable is missing #5

Closed
gmazzap opened this issue Mar 5, 2015 · 1 comment
Assignees
Milestone

Comments

@gmazzap
Copy link
Contributor

gmazzap commented Mar 5, 2015

In #4 @skyosev proposed a 'strict_variables' option (similar to Twig one) that would be useful in development context.

My first thoughts is to add it and support 3 values:

  • true -> thrown an Exception when a required var is not defined
  • false -> resolve undefined vars as empty strings (current and default behavior)
  • "notice" -> thrown a notice when a required var is not defined and resolve to empty string. This way it can be ignored using proper error_reporting setting.
@gmazzap gmazzap added this to the 0.3 milestone Mar 18, 2015
@gmazzap gmazzap self-assigned this Mar 18, 2015
@gmazzap
Copy link
Contributor Author

gmazzap commented Mar 18, 2015

Feature has been implemented in version 0.3.0

@gmazzap gmazzap closed this as completed Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant