Skip to content

[TwigBundle] Fix default value of strict_variables #9050

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

Merged
merged 1 commit into from
Jan 13, 2018

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Jan 13, 2018

@javiereguiluz javiereguiluz added this to the 2.7 milestone Jan 13, 2018
@javiereguiluz
Copy link
Member

Thank you Yonel.

@javiereguiluz javiereguiluz merged commit 3888217 into symfony:2.7 Jan 13, 2018
javiereguiluz added a commit that referenced this pull request Jan 13, 2018
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix default value of strict_variables

See https://github.com/symfony/symfony/blob/d78a98d793c2846d6decbff652d63f981e4f32f4/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php#L177

However, I'm proposing revert it since 4.1 and fix it inside the configuration section, see #9049

Commits
-------

3888217 Fix default value of strict_variables
@yceruto yceruto deleted the patch-5 branch January 13, 2018 13:39
fabpot added a commit to symfony/symfony that referenced this pull request Feb 6, 2018
…ebug" as default value of "strict_variable" (yceruto)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[TwigBundle] Deprecating "false" in favor of "kernel.debug" as default value of "strict_variable"

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

> http://symfony.com/doc/current/reference/configuration/twig.html#strict-variables
>**strict_variables**
> **type**: boolean **default**: `'%kernel.debug%'`

Nope, really it's `false` by default:
https://github.com/symfony/symfony/blob/1df45e43563a37633b50d4a36478090361a0b9de/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php#L130

Fixing it in symfony/symfony-docs#9050, but yes `'%kernel.debug%'` is a better default value, the [TwigBundle recipe](https://github.com/symfony/recipes/blob/bf2148f9f1fe5af7e19c3145b6f7246c6cabb3a5/symfony/twig-bundle/3.3/config/packages/twig.yaml#L4:) affirms that:
```yaml
twig:
    # ...
    strict_variables: '%kernel.debug%'
```
So yeah, it definitely looks like it should be the default value, wdyt?

Commits
-------

922878e Deprecating "false" as default value of "strict_variable" under Twig configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants