Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #3044 Allow string operators as variables names in assignment…
…s (fabpot) This PR was merged into the 1.x branch. Discussion ---------- Allow string operators as variables names in assignments closes #3041 Commits ------- 5835c23 allowed string operators as variables names in assignments
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* 1.42.1 (2019-XX-XX) | ||
|
||
* n/a | ||
* allowed string operators as variables names in assignments | ||
|
||
* 1.42.0 (2019-05-31) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/Twig/Tests/Fixtures/expressions/string_operator_as_var_assignment.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Twig supports the string operators as variable names in assignments | ||
--TEMPLATE-- | ||
{% for matches in [1, 2] %} | ||
{{- matches }} | ||
{% endfor %} | ||
|
||
{% set matches = [1, 2] %} | ||
|
||
OK | ||
--DATA-- | ||
return [] | ||
--EXPECT-- | ||
1 | ||
2 | ||
|
||
|
||
OK |