Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #2279 Deprecate usage of undefined blocks (julienfalque)
This PR was merged into the 1.x branch. Discussion ---------- Deprecate usage of undefined blocks Alternative to #2277. Commits ------- 75d474a Deprecate usage of undefined blocks
- Loading branch information
Showing
4 changed files
with
46 additions
and
10 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
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
12 changes: 12 additions & 0 deletions
12
test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.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,12 @@ | ||
--TEST-- | ||
"block" function with undefined block | ||
--TEMPLATE-- | ||
{% extends "base.twig" %} | ||
{% block foo %}{{ parent() }}{{ block('unknown') }}{{ block('bar') }}{% endblock %} | ||
--TEMPLATE(base.twig)-- | ||
{% block foo %}Foo{% endblock %} | ||
{% block bar %}Bar{% endblock %} | ||
--DATA-- | ||
return array() | ||
--EXPECT-- | ||
FooBarBar |
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