Commit Graph

963 Commits

Author SHA1 Message Date
Arnaud Le Blanc 542e9e76dc added getKeyValuePairs() on Twig_Node_Expression_Array 2011-11-12 12:10:50 +01:00
Arnaud Le Blanc 3f64f1d24c added test for hash keys 2011-11-12 11:56:47 +01:00
Arnaud Le Blanc 4bdb3a93a8 fixed tests 2011-11-12 11:56:40 +01:00
Arnaud Le Blanc 3b1f269e25 support any expression as hash key 2011-11-12 11:56:00 +01:00
Fabien Potencier 65f09ac724 fixed typo 2011-11-10 12:53:56 +01:00
Fabien Potencier 4655dbbe42 merged branch henrikbjorn/composer-autoload (PR #509)
Commits
-------

cf66a05 Add Autoloadig instructions for Composer

Discussion
----------

Add Autoloadig instructions for Composer

Add psr-0 autoload directive to composer.json for easier Autoloading
when using Composer as a package management tool
2011-11-08 13:22:31 +01:00
Henrik Bjørnskov cf66a054b8 Add Autoloadig instructions for Composer
Add psr-0 autoload directive to composer.json for easier Autoloading
when using Composer as a package management tool
2011-11-08 11:58:02 +01:00
Fabien Potencier 12addb3a1f merged branch craue/patch-1 (PR #507)
Commits
-------

98a859b fixed link name for `extends` tag

Discussion
----------

fixed link name for `extends` tag
2011-11-07 22:27:18 +01:00
Christian Raue 98a859b424 fixed link name for extends tag 2011-11-07 22:04:12 +01:00
Fabien Potencier 0cbb13d8fa removed json_encode call in Twig_Error when the filename is a string (to avoid the escaping of /) 2011-11-07 20:00:46 +01:00
Fabien Potencier 24eea1615a fixed operator precedences in the doc 2011-11-07 14:46:38 +01:00
Fabien Potencier aa6b835816 converted item parameter of Twig_Template::getAttribute() to string 2011-11-07 14:18:48 +01:00
Fabien Potencier 40595b848e fixed for tag loop variable when using a condition 2011-11-07 14:01:06 +01:00
Fabien Potencier 25336fd6fd refactored "for" tag (moved some logic from the token parser to the node) 2011-11-07 13:45:45 +01:00
Fabien Potencier 10c799fd90 changed the precedence of the .. operator 2011-11-05 08:30:08 +01:00
Fabien Potencier ace74cc6a0 fixed a typo in the doc 2011-11-05 08:07:20 +01:00
Fabien Potencier a3fcbd62cb updated CHANGELOG 2011-11-05 08:03:53 +01:00
Fabien Potencier f3f5afbb13 merged branch hason/arrayloader (PR #496)
Commits
-------

253f813 added an exception for undefined templates in ArrayLoader::isFresh

Discussion
----------

added an exception for undefined templates in ArrayLoader::isFresh
2011-11-05 08:02:41 +01:00
Fabien Potencier 8a102b51b5 merged branch trompette/patch-2 (PR #501)
Commits
-------

36020a9 typo

Discussion
----------

typo
2011-11-05 08:01:41 +01:00
Benoît Merlet 36020a95c0 typo 2011-11-05 00:48:00 +01:00
Fabien Potencier 23813770de fixed for tag when using a condition with strict_variables set to false 2011-11-04 13:32:43 +01:00
Martin Hasoň 253f8136c5 added an exception for undefined templates in ArrayLoader::isFresh 2011-11-03 12:01:29 +01:00
Fabien Potencier 103e857290 refactored code 2011-11-01 11:56:04 +01:00
Fabien Potencier 9117fc1ce0 added Twig_Function_Node to allow more complex functions to have their own Node class 2011-11-01 11:49:04 +01:00
Fabien Potencier 3427adc7ec added Twig_Filter_Node to allow more complex tests to have their own Node class (the default filter has been converted to use this new feature) 2011-11-01 11:48:05 +01:00
Fabien Potencier d1b5832ccd removed a function that is not used anymore 2011-11-01 11:29:09 +01:00
Fabien Potencier c2371dbbd6 migrated most tests to proper Node classes 2011-11-01 08:57:26 +01:00
Fabien Potencier c749c6b822 moved the defined test to a Twig_Test_Node class 2011-11-01 08:50:39 +01:00
Fabien Potencier b1d06ccbc9 added Twig_Test_Node to allow more complex tests to have their own Node class (sameas has been converted as an example) 2011-11-01 08:50:36 +01:00
Fabien Potencier 083d839000 added a better error message when a template is empty but contain a BOM 2011-10-31 18:49:47 +01:00
Fabien Potencier f5adcb6970 optimized tokenizer by pre-computing all start tag positions (memory and CPU) 2011-10-31 18:03:41 +01:00
Fabien Potencier 4b115d458f optimized a comparison in the tokenizer 2011-10-31 18:03:19 +01:00
Fabien Potencier 88dd4ac579 added notes in the doc about how the defined test and the default filter work 2011-10-30 14:47:32 +01:00
Fabien Potencier c001264a06 merged branch nikic/allowIsDefinedOnMethods (PR #490)
Commits
-------

930330f Allow defined test and default filter on methods

Discussion
----------

Allow defined test and default filter on methods

Patch for #487.

---------------------------------------------------------------------------

by fabpot at 2011/10/30 03:45:49 -0700

Problem is when some of the arguments reference variables that do not exist (`foo.bar(bar.foobar)`). That's why I've added the check on arguments.

---------------------------------------------------------------------------

by nikic at 2011/10/30 03:58:58 -0700

@fabpot I'm not exactly sure what is the expected behavior in that case. When writing `foo.defined(undefined)|default()` I think an exception is the expected behavior (because there is an undefined variable without default, even if it is in the method arguments). With `foo.undefined(undefined)|default()` on the other hand I'm not sure. One could argue that as the method does not exist the arguments never need to be evaluated.

---------------------------------------------------------------------------

by fabpot at 2011/10/30 05:49:46 -0700

The same code is used for the `defined` test: what would be the expected behavior for `foo.defined(underfined) is defined`?
2011-10-30 14:46:53 +01:00
Fabien Potencier d7120d1bf2 merged branch nikic/patch-1 (PR #489)
Commits
-------

7da9f2f Make long var/block tests faster

Discussion
----------

Make long var/block tests faster

When using `*` every single character is a different token, whereas with `x` there is only a single token. I don't think this hurts the actual test, but it improves the test runtime by something like 2/3 seconds on my machine.
2011-10-30 11:43:00 +01:00
nikic 930330fff0 Allow defined test and default filter on methods 2011-10-30 11:19:27 +01:00
nikic 7da9f2f9eb Make long var/block tests faster 2011-10-30 11:03:56 +01:00
Fabien Potencier cf6116c2a8 fixed previous commit 2011-10-29 15:13:27 +02:00
Fabien Potencier b3f472e479 renamed none to null in doc 2011-10-29 14:56:00 +02:00
Fabien Potencier 8d00b42e56 changed the documentation to advertize null as begin the null value and none as an alias 2011-10-29 14:53:37 +02:00
Fabien Potencier dfdd555b9a fixed in operator for empty strings 2011-10-29 14:50:10 +02:00
Fabien Potencier dc15afabb8 merged branch nikic/updateExtensionDocs (PR #488)
Commits
-------

2ebc788 Update extension docs and interface

Discussion
----------

Update extension docs and interface

Followup to #484: Twig isn't using globals for functions anymore.
2011-10-29 14:38:23 +02:00
nikic 2ebc788abc Update extension docs and interface
Twig isn't using globals for functions anymore.
2011-10-29 14:05:14 +02:00
Fabien Potencier 2bd27cf661 fixed typo in doc 2011-10-28 17:23:01 +02:00
Fabien Potencier 1b46f06394 merged branch phmLabs/documentation_return (PR #483)
Commits
-------

389f2c2 Changed mode from 0755 to 0644
c48bd2f Fixed wrong used PHPDoc tags

Discussion
----------

Fixed wrong used PHPDoc tags

@param was used instead of @return

---------------------------------------------------------------------------

by fabpot at 2011/10/25 05:47:59 -0700

Can you revert the mode change (from 0644 to 0755)?
2011-10-27 21:47:32 +02:00
Fabien Potencier b318494cfe added more unit tests for defined and default 2011-10-27 18:35:23 +02:00
Fabien Potencier 29534aada8 fixed the "defined" test and the "default" filter 2011-10-27 18:26:17 +02:00
Fabien Potencier 52a8afd67c added more unit tests (some do not pass... yet) 2011-10-26 22:23:21 +02:00
Fabien Potencier 3201b39f47 added missing supported charset for htmlspecialchars 2011-10-26 11:28:33 +02:00
Fabien Potencier 5e290cbb4d fixed deep nested defined tests 2011-10-26 11:20:38 +02:00