web/konrad/twig.git
14 years agoadded a note about how to turn off autoescaping
Fabien Potencier [Mon, 13 Dec 2010 17:40:51 +0000]
added a note about how to turn off autoescaping

14 years agoremoved the 'without loop' attribute for the 'for' tag
Fabien Potencier [Mon, 13 Dec 2010 14:59:12 +0000]
removed the 'without loop' attribute for the 'for' tag

14 years agoenhanced the for-loop optimizer pass 2 (patch from nikic)
Fabien Potencier [Mon, 13 Dec 2010 14:46:09 +0000]
enhanced the for-loop optimizer pass 2 (patch from nikic)

14 years agoenhanced the for-loop optimizer (patch from nikic)
Fabien Potencier [Mon, 13 Dec 2010 14:20:03 +0000]
enhanced the for-loop optimizer (patch from nikic)

14 years agoremoved usage of array_replace
Fabien Potencier [Mon, 13 Dec 2010 12:50:59 +0000]
removed usage of array_replace

14 years agoreverted inadvertently committed code
Fabien Potencier [Sun, 12 Dec 2010 13:35:15 +0000]
reverted inadvertently committed code

14 years agoadded the autoescape option to enable/disable autoescaping
Fabien Potencier [Sun, 12 Dec 2010 13:34:07 +0000]
added the autoescape option to enable/disable autoescaping

14 years agofix automatic escaping documentation
nikic [Sat, 11 Dec 2010 22:24:38 +0000]
fix automatic escaping documentation

14 years agofix comment in Optimizer NodeVisitor
nikic [Sat, 11 Dec 2010 22:14:35 +0000]
fix comment in Optimizer NodeVisitor

14 years agoremoved the newline after a comment (closes #195)
Fabien Potencier [Fri, 10 Dec 2010 06:13:32 +0000]
removed the newline after a comment (closes #195)

14 years agomade a speed optimization in Lexer
Fabien Potencier [Fri, 3 Dec 2010 17:35:29 +0000]
made a speed optimization in Lexer

14 years agomade lexer/parser/compiler lazy-loaded
Fabien Potencier [Fri, 3 Dec 2010 17:01:12 +0000]
made lexer/parser/compiler lazy-loaded

14 years agoupdated documentation on operators
Fabien Potencier [Fri, 3 Dec 2010 06:11:43 +0000]
updated documentation on operators

14 years agoadded missing info in CHANGELOG for 0.9.9
Fabien Potencier [Fri, 3 Dec 2010 05:56:36 +0000]
added missing info in CHANGELOG for 0.9.9

14 years agoadded a note in the CHANGELOG about how to remove the escaper extension
Fabien Potencier [Thu, 2 Dec 2010 15:40:55 +0000]
added a note in the CHANGELOG about how to remove the escaper extension

14 years agoadded a syntax error exception when parent block is used on a template that does...
Fabien Potencier [Thu, 2 Dec 2010 15:13:54 +0000]
added a syntax error exception when parent block is used on a template that does not extend another one

14 years agofixed parentheses placement for the ternary operator
Fabien Potencier [Thu, 2 Dec 2010 13:33:10 +0000]
fixed parentheses placement for the ternary operator

14 years agoremoved \
Fabien Potencier [Thu, 2 Dec 2010 13:18:44 +0000]
removed \

14 years agomade the Escaper and Optimizer extensions enabled by default
Fabien Potencier [Thu, 2 Dec 2010 09:26:45 +0000]
made the Escaper and Optimizer extensions enabled by default

14 years agoupdated CHANGELOG
Fabien Potencier [Thu, 2 Dec 2010 07:53:28 +0000]
updated CHANGELOG

14 years agofixed sandbox extension when used with auto output escaping
Fabien Potencier [Thu, 2 Dec 2010 07:52:42 +0000]
fixed sandbox extension when used with auto output escaping

14 years agofixed escaper when wrapping a Twig_Node_Print (the original class must be preserved)
Fabien Potencier [Thu, 2 Dec 2010 07:42:09 +0000]
fixed escaper when wrapping a Twig_Node_Print (the original class must be preserved)

14 years agorenamed a test
Fabien Potencier [Thu, 2 Dec 2010 07:31:22 +0000]
renamed a test

14 years agoupdated phpdoc
Fabien Potencier [Thu, 2 Dec 2010 07:30:47 +0000]
updated phpdoc

14 years agoadd instructions for the current date
IamPersistent [Tue, 30 Nov 2010 11:09:14 +0000]
add instructions for the current date

14 years agofix parsing of postfix expressions
Arnaud Le Blanc [Sun, 28 Nov 2010 20:01:23 +0000]
fix parsing of postfix expressions

14 years agotweaked odc intro
Fabien Potencier [Sun, 28 Nov 2010 18:21:08 +0000]
tweaked odc intro

14 years agomade some small changes to the previous commit
Fabien Potencier [Sun, 28 Nov 2010 16:14:00 +0000]
made some small changes to the previous commit

14 years agoAdded joined by statement to for loops
Jordi Boggiano [Sun, 28 Nov 2010 15:00:01 +0000]
Added joined by statement to for loops

14 years agoadded doc for the optimizer extension
Fabien Potencier [Sun, 28 Nov 2010 15:55:40 +0000]
added doc for the optimizer extension

14 years agoadded an Optimizer extension
Fabien Potencier [Sun, 28 Nov 2010 14:30:05 +0000]
added an Optimizer extension

14 years agoremoved obsolete option in unit tests
Fabien Potencier [Sun, 28 Nov 2010 13:28:07 +0000]
removed obsolete option in unit tests

14 years agoadded priority to node visitors
Fabien Potencier [Sun, 28 Nov 2010 13:17:56 +0000]
added priority to node visitors

14 years agoadded Twig_Test_Method
Fabien Potencier [Sun, 28 Nov 2010 12:53:37 +0000]
added Twig_Test_Method

14 years agobumped version for dev
Fabien Potencier [Sun, 28 Nov 2010 07:41:40 +0000]
bumped version for dev

14 years agoupdated CHANGELOG and bumped version to 0.9.9
Fabien Potencier [Sun, 28 Nov 2010 07:38:18 +0000]
updated CHANGELOG and bumped version to 0.9.9

14 years agoupdated doc for the pre_escape filter option
Arnaud Le Blanc [Sat, 27 Nov 2010 21:01:12 +0000]
updated doc for the pre_escape filter option

14 years agoAdded "pre_escape" option for filters
Arnaud Le Blanc [Tue, 16 Nov 2010 20:15:15 +0000]
Added "pre_escape" option for filters

This allows filters to get their input pre-escaped for a given context

14 years agofinished the configurability of operators
Fabien Potencier [Sun, 28 Nov 2010 07:13:15 +0000]
finished the configurability of operators

14 years agoadded file and line to Twig_Error_Runtime exceptions thrown from Twig_Template
Fabien Potencier [Sat, 27 Nov 2010 10:34:36 +0000]
added file and line to Twig_Error_Runtime exceptions thrown from Twig_Template

14 years agomade error message for strict variables more useful
Fabien Potencier [Sat, 27 Nov 2010 10:15:27 +0000]
made error message for strict variables more useful

14 years agochanged trans tag to accept any variable for the plural count
Fabien Potencier [Sat, 27 Nov 2010 09:10:04 +0000]
changed trans tag to accept any variable for the plural count

14 years agoupdated CHANGELOG
Fabien Potencier [Sat, 27 Nov 2010 08:40:12 +0000]
updated CHANGELOG

14 years agoupdated CHANGELOG
Fabien Potencier [Fri, 26 Nov 2010 21:17:32 +0000]
updated CHANGELOG

14 years agofixed __toString() calls when sandbox is enabled
Fabien Potencier [Fri, 26 Nov 2010 21:15:05 +0000]
fixed __toString() calls when sandbox is enabled

14 years agoadded more information to an exception to ease debugging
Fabien Potencier [Fri, 26 Nov 2010 20:13:26 +0000]
added more information to an exception to ease debugging

14 years agomade operators configurable
Fabien Potencier [Fri, 26 Nov 2010 19:57:53 +0000]
made operators configurable

14 years agoadded some example usage for the defined test in the doc
Fabien Potencier [Fri, 26 Nov 2010 18:14:17 +0000]
added some example usage for the defined test in the doc

14 years agofixed a warning and added some unit tests
Fabien Potencier [Fri, 26 Nov 2010 18:11:59 +0000]
fixed a warning and added some unit tests

14 years agoAllow is defined test on complex variables
Jordi Boggiano [Fri, 26 Nov 2010 17:58:49 +0000]
Allow is defined test on complex variables

14 years agofixed several bugs in SimpleTokenParser (nested optional grammar, and support for...
Fabien Potencier [Fri, 26 Nov 2010 17:58:54 +0000]
fixed several bugs in SimpleTokenParser (nested optional grammar, and support for , as a separator)

14 years agofixed typo
Fabien Potencier [Fri, 26 Nov 2010 16:21:29 +0000]
fixed typo

14 years agorewrote expression parser with a new algorithm to limit the depth of nested calls
Fabien Potencier [Fri, 26 Nov 2010 09:35:49 +0000]
rewrote expression parser with a new algorithm to limit the depth of nested calls

This change has no impact for the end user, but many internal benefits:

* less nested calls (was the primary reason for the change as xdebug limits the depth of nested calls);
* less code;
* code is much cleaner (I have removed all the parsing "hacks");
* faster;
* more flexible (we will now be able to expose an API to add new operators);
* easier to maintain.

14 years agoreplace all is_null($value) with null === $value
stloyd [Wed, 24 Nov 2010 20:29:49 +0000]
replace all is_null($value) with null === $value

14 years agoadded some missing tests
Fabien Potencier [Thu, 25 Nov 2010 16:11:24 +0000]
added some missing tests

14 years agoadded a defined test (strict_variables is now useable)
Fabien Potencier [Wed, 24 Nov 2010 08:47:51 +0000]
added a defined test (strict_variables is now useable)

14 years agoadded _charset as a special variable that references the current charset
Fabien Potencier [Sat, 20 Nov 2010 13:43:35 +0000]
added _charset as a special variable that references the current charset

14 years agohandle spl_object_hash collisions
Arnaud Le Blanc [Wed, 17 Nov 2010 20:47:21 +0000]
handle spl_object_hash collisions

14 years agoadded the spaceless tag
Fabien Potencier [Fri, 19 Nov 2010 12:20:22 +0000]
added the spaceless tag

14 years agoremoved trim_blocks option
Fabien Potencier [Fri, 19 Nov 2010 12:04:59 +0000]
removed trim_blocks option

The trim_blocks option has been removed as the rendered output depends on the value of this option.
This is not a problem for HTML output, but it's a big one if you want to output
plain text for instance.

The behavior now is the same as if the trim_blocks option is set to true. It mimicks
the behavior of PHP tags.

14 years agoChanged Twig_Node_Expression_Filter to accept only one filter
Arnaud Le Blanc [Mon, 15 Nov 2010 22:07:19 +0000]
Changed Twig_Node_Expression_Filter to accept only one filter

Chained filters are now represented by nested
Twig_Node_Expression_Filter nodes internally.

This makes it easier to analyse the tree

14 years agoremoved usage of SplObjectStorage as PHP < 5.3 does not support ArrayAccess
Fabien Potencier [Wed, 17 Nov 2010 10:35:26 +0000]
removed usage of SplObjectStorage as PHP < 5.3 does not support ArrayAccess

14 years agoadded support for is*() methods for attributes (foo.bar now looks for foo->getBar...
Fabien Potencier [Tue, 16 Nov 2010 09:51:23 +0000]
added support for is*() methods for attributes (foo.bar now looks for foo->getBar() or foo->isBar())

14 years agofix storage of object properties in analysis
Arnaud Le Blanc [Sun, 7 Nov 2010 23:07:24 +0000]
fix storage of object properties in analysis

14 years agoupdated CHANGELOG
Fabien Potencier [Sun, 7 Nov 2010 21:20:58 +0000]
updated CHANGELOG

14 years agomade a clarification to the doc
Fabien Potencier [Sun, 7 Nov 2010 21:18:41 +0000]
made a clarification to the doc

14 years agomoved all exceptions to Twig_Error_*
Fabien Potencier [Sun, 7 Nov 2010 21:18:31 +0000]
moved all exceptions to Twig_Error_*

14 years agoupdated CHANGELOG
Fabien Potencier [Sun, 7 Nov 2010 20:45:11 +0000]
updated CHANGELOG

14 years agofixed unary expressions
Fabien Potencier [Sun, 7 Nov 2010 20:44:05 +0000]
fixed unary expressions

14 years agoRemove is_escaper flag from urlencode
Jordi Boggiano [Tue, 5 Oct 2010 21:51:42 +0000]
Remove is_escaper flag from urlencode

urlencode is an url escaper but not an html escaper so I don't think it should be exempt from auto-escaping

14 years agoFix replace filter name in documentation
ornicar [Sun, 7 Nov 2010 19:26:32 +0000]
Fix replace filter name in documentation

14 years agoupdate docs for automatic escaping
Arnaud Le Blanc [Sun, 7 Nov 2010 17:23:31 +0000]
update docs for automatic escaping

14 years agoadded a note about using rewind() after look()
Fabien Potencier [Sun, 7 Nov 2010 13:37:08 +0000]
added a note about using rewind() after look()

14 years agofixed child templates (with an extend tag) that uses one or more imports
Fabien Potencier [Sun, 7 Nov 2010 13:31:47 +0000]
fixed child templates (with an extend tag) that uses one or more imports

14 years agofixed documentation and added infix notation for in (already supported for is)
Fabien Potencier [Sun, 7 Nov 2010 13:21:10 +0000]
fixed documentation and added infix notation for in (already supported for is)

14 years agoupdated CHANGELOG
Fabien Potencier [Sun, 7 Nov 2010 09:04:07 +0000]
updated CHANGELOG

14 years agochanged how nl2br is implemented in tests to better reflect how it should be done...
Fabien Potencier [Sun, 7 Nov 2010 08:58:28 +0000]
changed how nl2br is implemented in tests to better reflect how it should be done in userland code

14 years agoremoved @version phpdoc attribute
Fabien Potencier [Sun, 7 Nov 2010 08:26:25 +0000]
removed @version phpdoc attribute

14 years agofixed CS
Fabien Potencier [Sun, 7 Nov 2010 08:17:24 +0000]
fixed CS

14 years agodeeply mark expressions as safe (e.g. a conditonal expression is safe if both operand...
Arnaud Le Blanc [Sat, 6 Nov 2010 02:49:37 +0000]
deeply mark expressions as safe (e.g. a conditonal expression is safe if both operands are literals)

14 years agosupport for specifying the escaping type of a filter
Arnaud Le Blanc [Sat, 6 Nov 2010 02:36:14 +0000]
support for specifying the escaping type of a filter

14 years agoChanged escaping rules (switched to post-escaping)
Arnaud Le Blanc [Sun, 22 Aug 2010 00:30:25 +0000]
Changed escaping rules (switched to post-escaping)

Expression in Print nodes are always escaped before being printed,
except in two conditions :
  * if the expression is an Expression_Constant node
  * if the last filter in the chain is an escaper

14 years agomade the include tag more flexible
Fabien Potencier [Mon, 1 Nov 2010 03:24:32 +0000]
made the include tag more flexible

14 years agofixed a unit test so that it works for more PHP versions
Fabien Potencier [Tue, 26 Oct 2010 17:49:31 +0000]
fixed a unit test so that it works for more PHP versions

14 years agofixed typo
Fabien Potencier [Sat, 23 Oct 2010 08:38:18 +0000]
fixed typo

14 years agoOptimize/uniformalize the multibyte filters
Jordi Boggiano [Thu, 21 Oct 2010 18:52:26 +0000]
Optimize/uniformalize the multibyte filters

14 years agoRemoved unnecessary twig_constant_filter function
Jordi Boggiano [Thu, 21 Oct 2010 18:17:56 +0000]
Removed unnecessary twig_constant_filter function

14 years agofixed typos in the docs
Fabien Potencier [Tue, 19 Oct 2010 11:19:52 +0000]
fixed typos in the docs

14 years agofixed typo in the doc
Fabien Potencier [Mon, 11 Oct 2010 10:27:59 +0000]
fixed typo in the doc

14 years agoupdated doc
Fabien Potencier [Wed, 6 Oct 2010 13:11:15 +0000]
updated doc

14 years agorenamed urlencode to url_encode
Fabien Potencier [Wed, 6 Oct 2010 13:10:20 +0000]
renamed urlencode to url_encode

14 years agoAdded json_encode filter
Jordi Boggiano [Tue, 5 Oct 2010 21:23:45 +0000]
Added json_encode filter

14 years agoFixed PHP 5.3 namespace dependency (Issues a warning in PHP 5.2).
Matt Agar [Mon, 4 Oct 2010 22:58:35 +0000]
Fixed PHP 5.3 namespace dependency (Issues a warning in PHP 5.2).

14 years agochanged the way to access nodes and attributes from a node
Fabien Potencier [Sat, 2 Oct 2010 06:23:54 +0000]
changed the way to access nodes and attributes from a node

Before:
  Nodes were accessed via node properties ($node->body)
  Attributes were accessed via node array access ($node['name'])

After:
  Nodes are accessed via getNode(), setNode(), ... ($node->getNode('body'))
  Attributes are accessed via getAttribute(), setAttribute(), ... ($node->getAttribute('name'))

The change was necessary because of side-effects. This is one more time the
demonstration that being explicit is always better than magic ;)

14 years agofixed typo
Fabien Potencier [Fri, 1 Oct 2010 18:34:31 +0000]
fixed typo

14 years agoadded a note to get an extension reference
Fabien Potencier [Fri, 1 Oct 2010 18:28:02 +0000]
added a note to get an extension reference

14 years agofixed typo
Fabien Potencier [Fri, 1 Oct 2010 18:13:25 +0000]
fixed typo

14 years agorenamed |safe to |raw to avoid unnecesarry confusion about what the tags does.
henrikbjorn [Fri, 1 Oct 2010 11:48:52 +0000]
renamed |safe to |raw to avoid unnecesarry confusion about what the tags does.

Discussion can be viewed here http://groups.google.com/group/symfony-devs/browse_thread/thread/b927063310c74411. All tests pass.

14 years agochanged the implementation of template inheritance
Fabien Potencier [Fri, 1 Oct 2010 12:11:58 +0000]
changed the implementation of template inheritance

14 years agoremoved obsolete code
Fabien Potencier [Fri, 1 Oct 2010 10:08:57 +0000]
removed obsolete code