web/konrad/twig.git
13 years agoremoved unneeded wrapping nodes added during parsing
Fabien Potencier [Mon, 3 Jan 2011 17:35:07 +0000]
removed unneeded wrapping nodes added during parsing

13 years agoremoved the grammar and simple token parser code (moved to the Twig Extensions reposi...
Fabien Potencier [Mon, 3 Jan 2011 11:28:11 +0000]
removed the grammar and simple token parser code (moved to the Twig Extensions repository)

13 years agoadded a unit test for previous commit
Fabien Potencier [Mon, 3 Jan 2011 07:03:36 +0000]
added a unit test for previous commit

13 years agotrack brackets nesting in lexer
nikic [Fri, 31 Dec 2010 16:26:55 +0000]
track brackets nesting in lexer

13 years agoadd Twig_Compiler type hints
nikic [Thu, 23 Dec 2010 15:22:26 +0000]
add Twig_Compiler type hints

13 years agofix wrong error message
nikic [Fri, 31 Dec 2010 16:27:32 +0000]
fix wrong error message

13 years agoadded some missing phpdoc
Fabien Potencier [Fri, 31 Dec 2010 15:45:07 +0000]
added some missing phpdoc

13 years agoremoved references to old Twig versions in the doc
Fabien Potencier [Fri, 31 Dec 2010 14:39:30 +0000]
removed references to old Twig versions in the doc

13 years agoremoved old recipe from the doc as macros do not output their content directly anymore
Fabien Potencier [Fri, 31 Dec 2010 14:39:12 +0000]
removed old recipe from the doc as macros do not output their content directly anymore

13 years agotweaked doc
Fabien Potencier [Fri, 31 Dec 2010 11:27:49 +0000]
tweaked doc

13 years agofixed optimizer
Fabien Potencier [Thu, 30 Dec 2010 20:48:36 +0000]
fixed optimizer

13 years agoimproved error messages
Leon van der Ree [Mon, 27 Dec 2010 13:16:09 +0000]
improved error messages

14 years agofixed typo
Fabien Potencier [Thu, 30 Dec 2010 14:43:58 +0000]
fixed typo

14 years agoupdated the CHANGELOG
Fabien Potencier [Thu, 30 Dec 2010 14:39:38 +0000]
updated the CHANGELOG

14 years agofixed ternary operator when used for the default filter
Fabien Potencier [Thu, 30 Dec 2010 10:58:28 +0000]
fixed ternary operator when used for the default filter

14 years agoadded a caution about nested hashes in the docs
Fabien Potencier [Thu, 30 Dec 2010 10:40:02 +0000]
added a caution about nested hashes in the docs

14 years agoupdate include doc to use hashes and the current Environment API
nikic [Wed, 29 Dec 2010 17:45:22 +0000]
update include doc to use hashes and the current Environment API

14 years agochanged autoescape first argument from on/off to the standard true/false
Fabien Potencier [Wed, 29 Dec 2010 12:11:03 +0000]
changed autoescape first argument from on/off to the standard true/false

14 years agoadded the possibility to have tags in the global scope (outside blocks) in a child...
Fabien Potencier [Tue, 28 Dec 2010 18:30:49 +0000]
added the possibility to have tags in the global scope (outside blocks) in a child template

14 years agoreplaced {% display foo %} with {{ block('foo') }}
Fabien Potencier [Wed, 29 Dec 2010 11:41:28 +0000]
replaced {% display foo %} with {{ block('foo') }}

14 years agoreplaced {% parent %} with {{ parent() }}
Fabien Potencier [Wed, 29 Dec 2010 10:15:04 +0000]
replaced {% parent %} with {{ parent() }}

14 years agoremoved 'joined by' support for the 'for' tag as a tag should not output something...
Fabien Potencier [Tue, 28 Dec 2010 18:28:29 +0000]
removed 'joined by' support for the 'for' tag as a tag should not output something directly

14 years agoadded a note about autoescaping and concatenation in the doc
Fabien Potencier [Thu, 30 Dec 2010 08:17:01 +0000]
added a note about autoescaping and concatenation in the doc

14 years agofixed scope for macros (macros can be imported in a block or outside of a block)
Fabien Potencier [Wed, 29 Dec 2010 09:17:06 +0000]
fixed scope for macros (macros can be imported in a block or outside of a block)

    {% import "macros" as foo %}
    {% from "macros" import foo, bar as bar %}

    {% block foo %}
        {% import "macros" as foofoo %}
        {% from "macros" import foo as foofoo, bar as barbar %}

        {{ foo('something') }}
        {{ bar('something') }}

        {{ foofoo('something') }}
        {{ barbar('something') }}
    {% endblock %}

14 years agofixed typo
Fabien Potencier [Tue, 28 Dec 2010 20:05:58 +0000]
fixed typo

14 years agofixed CS
Fabien Potencier [Tue, 28 Dec 2010 18:50:01 +0000]
fixed CS

14 years agoremoved Template::callFunction
Arnaud Le Blanc [Sun, 26 Dec 2010 11:47:49 +0000]
removed Template::callFunction

14 years agoupdated doc for functions
Arnaud Le Blanc [Sat, 25 Dec 2010 17:19:04 +0000]
updated doc for functions

14 years agoAdded sandbox support for functions
Arnaud Le Blanc [Sat, 25 Dec 2010 15:08:12 +0000]
Added sandbox support for functions

14 years agoAdded auto-escaper support for functions
Arnaud Le Blanc [Fri, 24 Dec 2010 16:21:26 +0000]
Added auto-escaper support for functions

Functions' output is escaped by default and functions can declare
themselves "safe" using the "is_safe" option.

14 years agoHandle functions like filters
Arnaud Le Blanc [Fri, 24 Dec 2010 16:21:10 +0000]
Handle functions like filters

Functions are not global variables anymore. They are resolved at
compile time, and Twig_Function objects are instanciated only when
compiling.

14 years agoResolve imported functions at compile time
Arnaud Le Blanc [Thu, 23 Dec 2010 21:10:18 +0000]
Resolve imported functions at compile time

{% from %} is compiled as {% import %}, the imported module is placed in
a local variable, and calls to imported functions are compiled as calls
to module functions.

14 years agoAdded nodes representing local variables
Arnaud Le Blanc [Thu, 23 Dec 2010 21:07:22 +0000]
Added nodes representing local variables

Allows to use local PHP variables as temporary variables in compiled
templates

14 years agorenamed Template::getParentBlock() and getBlock() to diplayParentBlock() and displayB...
Fabien Potencier [Thu, 30 Dec 2010 08:30:10 +0000]
renamed Template::getParentBlock() and getBlock() to diplayParentBlock() and displayBlock(), which is semantically more correct

14 years agoupdate Core Extension doc
nikic [Thu, 23 Dec 2010 10:26:09 +0000]
update Core Extension doc

14 years agofix Exception documentation, remove use of Twig_SyntaxError
nikic [Thu, 23 Dec 2010 10:14:45 +0000]
fix Exception documentation, remove use of Twig_SyntaxError

14 years agodisallow {% set %}{% endset %}
nikic [Wed, 22 Dec 2010 16:19:37 +0000]
disallow {% set %}{% endset %}

14 years agorename $parser to $stream in parseArguments
nikic [Wed, 22 Dec 2010 16:33:28 +0000]
rename $parser to $stream in parseArguments

14 years agoadded the possibility to look at more than just the very next token
Fabien Potencier [Wed, 22 Dec 2010 10:58:10 +0000]
added the possibility to look at more than just the very next token

14 years agoreadded TokenStream::look()
Fabien Potencier [Wed, 22 Dec 2010 10:49:01 +0000]
readded TokenStream::look()

14 years agoTokenStream changes:
nikic [Mon, 20 Dec 2010 15:41:30 +0000]
TokenStream changes:

 * remove unused look() and rewind()
 * do not shift tokens, but increase a pointer

14 years agoimprove lexer (causes changes in token stream, token and parser)
nikic [Mon, 20 Dec 2010 15:30:50 +0000]
improve lexer (causes changes in token stream, token and parser)

14 years agofixed typo
Fabien Potencier [Wed, 22 Dec 2010 10:33:29 +0000]
fixed typo

14 years agoremove $is_multitarget return in parseMultitargetExpression
nikic [Mon, 20 Dec 2010 17:39:16 +0000]
remove $is_multitarget return in parseMultitargetExpression

Furthermore slightly reordered code thus removing redundant expect()

14 years agoadded some unit tests for previous commit
Fabien Potencier [Mon, 20 Dec 2010 18:05:45 +0000]
added some unit tests for previous commit

14 years agoOne should only be able to assign to variables
nikic [Mon, 20 Dec 2010 17:36:34 +0000]
One should only be able to assign to variables

14 years agoremove unused $lineno variable
nikic [Mon, 20 Dec 2010 17:34:49 +0000]
remove unused $lineno variable

14 years agochange while(1) to while(true)
nikic [Mon, 20 Dec 2010 17:32:42 +0000]
change while(1) to while(true)

14 years agoremove "(,)" hint from syntax error messages (the expect function will do that already)
nikic [Mon, 20 Dec 2010 17:31:31 +0000]
remove "(,)" hint from syntax error messages (the expect function will do that already)

14 years agouse the passed $token in isUnary and isBinary of ExpressionParser
nikic [Mon, 20 Dec 2010 17:27:01 +0000]
use the passed $token in isUnary and isBinary of ExpressionParser

14 years agoGrammer/Hash: array -> hash
nikic [Mon, 20 Dec 2010 16:05:28 +0000]
Grammer/Hash: array -> hash

14 years agotweaked error message
Fabien Potencier [Mon, 20 Dec 2010 14:05:29 +0000]
tweaked error message

14 years agochanged error messages to be more friendly
Fabien Potencier [Mon, 20 Dec 2010 13:48:07 +0000]
changed error messages to be more friendly

14 years agoconverted the cycle filter to a function
Fabien Potencier [Mon, 20 Dec 2010 07:45:45 +0000]
converted the cycle filter to a function

14 years agoconverted the constant filter to a function
Fabien Potencier [Mon, 20 Dec 2010 07:40:02 +0000]
converted the constant filter to a function

14 years agoconverted the range filter to a function
Fabien Potencier [Mon, 20 Dec 2010 07:36:03 +0000]
converted the range filter to a function

14 years agoforced functions to have fn_ as a prefix to avoid name clashes between functions...
Fabien Potencier [Sun, 19 Dec 2010 21:24:10 +0000]
forced functions to have fn_ as a prefix to avoid name clashes between functions and variables

14 years agofixed doc index
Fabien Potencier [Sun, 19 Dec 2010 20:53:00 +0000]
fixed doc index

14 years agofixed typo
Fabien Potencier [Sun, 19 Dec 2010 20:52:54 +0000]
fixed typo

14 years agorewrote the advanced chapter and documented globals and functions
Fabien Potencier [Sun, 19 Dec 2010 18:56:14 +0000]
rewrote the advanced chapter and documented globals and functions

14 years agoadded global variables
Fabien Potencier [Sun, 19 Dec 2010 13:01:21 +0000]
added global variables

14 years agomade macro return their value instead of echoing directly
Fabien Potencier [Sun, 19 Dec 2010 10:42:50 +0000]
made macro return their value instead of echoing directly

14 years agoadded from tag
Fabien Potencier [Sun, 19 Dec 2010 10:26:38 +0000]
added from tag

14 years agoadded support for functions
Fabien Potencier [Sat, 18 Dec 2010 15:20:05 +0000]
added support for functions

14 years agofixed typo
Fabien Potencier [Sun, 19 Dec 2010 10:43:03 +0000]
fixed typo

14 years agomade macros callable when sandbox mode is enabled
Fabien Potencier [Sat, 18 Dec 2010 13:31:15 +0000]
made macros callable when sandbox mode is enabled

14 years agofixed markup
Fabien Potencier [Sat, 18 Dec 2010 13:20:48 +0000]
fixed markup

14 years agoadded a new recipe
Fabien Potencier [Sat, 18 Dec 2010 13:19:40 +0000]
added a new recipe

14 years agofixed if tag documentation
Fabien Potencier [Sat, 18 Dec 2010 12:44:51 +0000]
fixed if tag documentation

14 years agoadded an exception when a macro uses a reserved name
Fabien Potencier [Sat, 18 Dec 2010 12:15:24 +0000]
added an exception when a macro uses a reserved name

14 years agochanged default filter to use the empty test
Fabien Potencier [Sat, 18 Dec 2010 11:56:44 +0000]
changed default filter to use the empty test

14 years agofixed markup in doc
Fabien Potencier [Sat, 18 Dec 2010 10:26:41 +0000]
fixed markup in doc

14 years agoadded the empty test
Fabien Potencier [Sat, 18 Dec 2010 10:26:16 +0000]
added the empty test

14 years agoremoved the 'items' filter, which has been deprecated a long time ago
Fabien Potencier [Sat, 18 Dec 2010 10:21:46 +0000]
removed the 'items' filter, which has been deprecated a long time ago

14 years agosome improvements to for tag compiler
nikic [Thu, 16 Dec 2010 22:30:30 +0000]
some improvements to for tag compiler

14 years agomade a small performance optimization
Fabien Potencier [Sat, 18 Dec 2010 07:04:21 +0000]
made a small performance optimization

14 years agoremoved n/a strings leftover
Fabien Potencier [Sat, 18 Dec 2010 07:02:24 +0000]
removed n/a strings leftover

14 years agobumped version for dev
Fabien Potencier [Thu, 16 Dec 2010 08:48:40 +0000]
bumped version for dev

14 years agoupdated CHANGELOG and bumped version to 0.9.10
Fabien Potencier [Thu, 16 Dec 2010 08:47:09 +0000]
updated CHANGELOG and bumped version to 0.9.10

14 years agotweaked merge filter
Fabien Potencier [Thu, 16 Dec 2010 08:44:10 +0000]
tweaked merge filter

14 years agoadded documentation for the merge filter
Fabien Potencier [Thu, 16 Dec 2010 08:07:55 +0000]
added documentation for the merge filter

14 years agoadded the merge filter
Fabien Potencier [Thu, 16 Dec 2010 07:10:41 +0000]
added the merge filter

14 years agoremoved the possibility to inject a lexer/parser/compiler in the environment constructor
Fabien Potencier [Wed, 15 Dec 2010 12:32:39 +0000]
removed the possibility to inject a lexer/parser/compiler in the environment constructor

14 years agosimplified code
Fabien Potencier [Wed, 15 Dec 2010 12:31:15 +0000]
simplified code

14 years agoconverted documentation to rst
Fabien Potencier [Wed, 15 Dec 2010 11:25:16 +0000]
converted documentation to rst

14 years agomoved the i18n extension to the Twig Extensions repository
Fabien Potencier [Wed, 15 Dec 2010 07:28:13 +0000]
moved the i18n extension to the Twig Extensions repository

14 years agoimprove filesystem loader cache and use '/' instead of DIRECTORY_SEPARATOR
nikic [Tue, 14 Dec 2010 17:49:35 +0000]
improve filesystem loader cache and use '/' instead of DIRECTORY_SEPARATOR

14 years agosimplified code
Fabien Potencier [Tue, 14 Dec 2010 16:52:54 +0000]
simplified code

14 years agosimplified code
Fabien Potencier [Tue, 14 Dec 2010 16:51:44 +0000]
simplified code

14 years agoadded an optimizations options to Twig_Environment
Fabien Potencier [Tue, 14 Dec 2010 16:30:45 +0000]
added an optimizations options to Twig_Environment

14 years agomade some tweak to the security check for the filesystem loader
Fabien Potencier [Tue, 14 Dec 2010 16:24:03 +0000]
made some tweak to the security check for the filesystem loader

14 years agoallow null filenames
nikic [Tue, 14 Dec 2010 15:46:28 +0000]
allow null filenames

14 years agoremoved 'is_escaper' option for filters (a left over from the previous version)
Fabien Potencier [Tue, 14 Dec 2010 15:38:11 +0000]
removed 'is_escaper' option for filters (a left over from the previous version)

14 years agoremoved support for foo.% which does not make sense
Fabien Potencier [Tue, 14 Dec 2010 15:23:56 +0000]
removed support for foo.% which does not make sense

14 years agofixed usage of operators as method names (like is, in, and not)
Fabien Potencier [Tue, 14 Dec 2010 14:19:37 +0000]
fixed usage of operators as method names (like is, in, and not)

14 years agoadded an optimizer to remove the raw filter
Fabien Potencier [Tue, 14 Dec 2010 14:10:35 +0000]
added an optimizer to remove the raw filter

14 years agochanged the order of execution for node visitors
Fabien Potencier [Tue, 14 Dec 2010 14:09:12 +0000]
changed the order of execution for node visitors

14 years agofixed security check in filesystem loader
Fabien Potencier [Tue, 14 Dec 2010 13:36:45 +0000]
fixed security check in filesystem loader

14 years agoadded some unit tests for the filesystem loader
Fabien Potencier [Tue, 14 Dec 2010 13:28:47 +0000]
added some unit tests for the filesystem loader

14 years agofixed default() filter behavior when used with strict_variables set to on
Fabien Potencier [Tue, 14 Dec 2010 13:27:28 +0000]
fixed default() filter behavior when used with strict_variables set to on