Commit 993b77a
authored
[TASK] Allow TemplateValidator to discover underscore variables (#1283)
Fluid 5 disallows variable names that start with an underscore. While
this is already enforced in `StandardVariableProvider` for setting
such variables, this change now also triggers an exception if a
variable with an invalid name is accessed.
This is probably a temporary change to be removed with Fluid 6. For now,
it allows the `TemplateValidator`, which is used during template
warmup, to discover this issue during parse time, and to let users
know about affected templates.
Resolves: #12631 parent ae55cbd commit 993b77a
File tree
3 files changed
+9
-0
lines changed- src/Core/Parser/SyntaxTree
- tests/Functional
- Fixtures/Validation
- Validation
3 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments