Commit Graph

327 Commits

Author SHA1 Message Date
Fabien Potencier 20970419b4 removed support for foo.% which does not make sense 2010-12-14 16:23:56 +01:00
Fabien Potencier 3c01290c66 fixed usage of operators as method names (like is, in, and not) 2010-12-14 15:20:49 +01:00
Fabien Potencier 18a317146b added an optimizer to remove the raw filter 2010-12-14 15:10:53 +01:00
Fabien Potencier 2e08bd705c changed the order of execution for node visitors 2010-12-14 15:09:27 +01:00
Fabien Potencier efdcb8c6f4 fixed security check in filesystem loader 2010-12-14 14:36:45 +01:00
Fabien Potencier e0ea4a962a fixed default() filter behavior when used with strict_variables set to on 2010-12-14 14:27:28 +01:00
Fabien Potencier a00f3f5da6 added an exception when trying to outdent too much 2010-12-14 12:54:32 +01:00
Fabien Potencier 28f4cb749e tweaked last commit 2010-12-14 11:50:47 +01:00
Mark Story 339eb082ed Adding Twig_Environment::clearCacheFiles() to clear cache files that twig makes.
Refactoring test cases in previous commit.  Adding more tests for clearing cache files.
Fixes #192
2010-12-14 11:48:33 +01:00
Fabien Potencier 48ac60e082 fixed filesystem loader compatibility with PHAR files 2010-12-14 11:36:59 +01:00
Fabien Potencier c202b2891f enhanced error messages when an unexpected token is parsed in an expression 2010-12-14 09:47:56 +01:00
Fabien Potencier 8f33ca7111 fixed filename not being added to syntax error messages 2010-12-14 09:33:11 +01:00
Fabien Potencier 4505200d9f changed array/hashes notation 2010-12-14 09:33:07 +01:00
Fabien Potencier 639163165a fixed typo 2010-12-14 08:18:33 +01:00
Fabien Potencier e9c329e577 fixed phpdoc, tweaked doc 2010-12-14 07:54:51 +01:00
Fabien Potencier ac0b54c141 removed the 'without loop' attribute for the 'for' tag 2010-12-13 15:59:12 +01:00
Fabien Potencier 8cd9bcb775 enhanced the for-loop optimizer pass 2 (patch from nikic) 2010-12-13 15:46:09 +01:00
Fabien Potencier e0f20a0c4d enhanced the for-loop optimizer (patch from nikic) 2010-12-13 15:20:03 +01:00
Fabien Potencier 991021bf4e removed usage of array_replace 2010-12-13 13:50:59 +01:00
Fabien Potencier ace7aa8138 reverted inadvertently committed code 2010-12-12 14:35:15 +01:00
Fabien Potencier cda18ed947 added the autoescape option to enable/disable autoescaping 2010-12-12 14:34:07 +01:00
nikic 4bfa8df5f7 fix comment in Optimizer NodeVisitor 2010-12-12 07:33:22 +01:00
Fabien Potencier 77bec04874 removed the newline after a comment (closes #195) 2010-12-10 07:13:32 +01:00
Fabien Potencier 67452dbe73 made a speed optimization in Lexer 2010-12-03 18:35:29 +01:00
Fabien Potencier e5a8646481 made lexer/parser/compiler lazy-loaded 2010-12-03 18:01:12 +01:00
Fabien Potencier 08bd27f772 added a syntax error exception when parent block is used on a template that does not extend another one 2010-12-02 16:13:54 +01:00
Fabien Potencier 031bf84b25 fixed parentheses placement for the ternary operator 2010-12-02 14:33:10 +01:00
Fabien Potencier 3f69ae2d42 removed \ 2010-12-02 14:18:44 +01:00
Fabien Potencier 2fe655fa2a made the Escaper and Optimizer extensions enabled by default 2010-12-02 10:26:45 +01:00
Fabien Potencier c7dacdd6a0 fixed sandbox extension when used with auto output escaping 2010-12-02 08:52:42 +01:00
Fabien Potencier c79bb17c93 fixed escaper when wrapping a Twig_Node_Print (the original class must be preserved) 2010-12-02 08:51:53 +01:00
Fabien Potencier d5de1a2afd updated phpdoc 2010-12-02 08:30:47 +01:00
Arnaud Le Blanc 7284fa9829 fix parsing of postfix expressions 2010-11-29 08:05:26 +01:00
Jordi Boggiano 0e1b2ca857 Added joined by statement to for loops 2010-11-28 17:10:03 +01:00
Fabien Potencier bd5629b3f2 added an Optimizer extension 2010-11-28 15:30:05 +01:00
Fabien Potencier 5c5a9d45ea added priority to node visitors 2010-11-28 14:18:09 +01:00
Fabien Potencier 5f0d582d1e added Twig_Test_Method 2010-11-28 13:53:37 +01:00
Fabien Potencier c54e0dad20 bumped version for dev 2010-11-28 08:41:40 +01:00
Fabien Potencier 399a8f5c13 updated CHANGELOG and bumped version to 0.9.9 2010-11-28 08:38:18 +01:00
Arnaud Le Blanc d35e19fe22 Added "pre_escape" option for filters
This allows filters to get their input pre-escaped for a given context
2010-11-28 08:14:32 +01:00
Fabien Potencier f103997b3f finished the configurability of operators 2010-11-28 08:13:15 +01:00
Fabien Potencier 6c74b60612 added file and line to Twig_Error_Runtime exceptions thrown from Twig_Template 2010-11-27 11:34:36 +01:00
Fabien Potencier c66ab82354 made error message for strict variables more useful 2010-11-27 11:15:27 +01:00
Fabien Potencier bea562a246 changed trans tag to accept any variable for the plural count 2010-11-27 10:10:04 +01:00
Fabien Potencier 7cdada5d05 fixed __toString() calls when sandbox is enabled 2010-11-26 22:15:05 +01:00
Fabien Potencier ab2a9ac459 added more information to an exception to ease debugging 2010-11-26 21:13:26 +01:00
Fabien Potencier dc71bf1a82 made operators configurable 2010-11-26 20:57:53 +01:00
Jordi Boggiano 3c94b3c033 Allow is defined test on complex variables 2010-11-26 19:06:50 +01:00
Fabien Potencier a511b9bd64 fixed several bugs in SimpleTokenParser (nested optional grammar, and support for , as a separator) 2010-11-26 18:58:54 +01:00
Fabien Potencier 9d8583efcc 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.
2010-11-26 16:35:59 +01:00