Commit Graph

1180 Commits

Author SHA1 Message Date
Fabien Potencier f64d976182 updated doc for the date filter 2011-12-30 09:21:01 +01:00
Fabien Potencier 736dfa84d0 added a way to set the default global date interval format 2011-12-30 09:15:53 +01:00
Fabien Potencier 519b6805b0 refactored date filter code 2011-12-30 08:58:12 +01:00
Fabien Potencier bd0807221b merged branch alefranz/patch-2 (PR #575)
Commits
-------

b295274 fix Date Format filter: DateInterval does not provide setTimezone()

Discussion
----------

fix Date Format filter: DateInterval does not provide setTimezone()
2011-12-30 08:50:36 +01:00
alefranz b2952743d1 fix Date Format filter: DateInterval does not provide setTimezone() 2011-12-29 19:46:53 +01:00
Fabien Potencier fc85a16886 refactored Twig_Template::display() to ease its extension 2011-12-28 23:05:59 +01:00
Fabien Potencier 88de457774 tweaked previous merge 2011-12-28 20:34:32 +01:00
Fabien Potencier a9c53bc3fb merged branch markstory/number-format (PR #573)
Commits
-------

e3b81ad Add documentation page for number_format.
0edcfdd Add number_format filter.

Discussion
----------

Implement number_format filter

Implement a `number_format` filter that wraps the native PHP `number_format`.

Fixes #417
2011-12-28 20:32:43 +01:00
Mark Story e3b81ad8cd Add documentation page for number_format. 2011-12-28 11:18:31 -05:00
Mark Story 0edcfdd28b Add number_format filter.
Refs #417
2011-12-28 10:39:04 -05:00
Fabien Potencier 670d5d7100 fixed Twig_Node_Expression_Array::hasElement() 2011-12-26 22:06:43 +01:00
Fabien Potencier fb6d5660ab prepared the 1.5.0-RC1 release v1.5.0-RC1 2011-12-26 11:40:36 +01:00
Fabien Potencier 5ee53cd550 fixed markup 2011-12-26 11:32:17 +01:00
Fabien Potencier 4b8a0e5e7a added missing doc for the do tag 2011-12-26 11:21:22 +01:00
Fabien Potencier a9aeea41d2 fixed typo 2011-12-26 11:17:02 +01:00
Fabien Potencier f3de043d0e changed hash key expression support (expression must now be enclosed with parentheses and hash keys can now be names) 2011-12-26 09:35:38 +01:00
Fabien Potencier 0d48b6d19d merged branch jeserkin/jeserkin (PR #570)
Commits
-------

fd78ec0 Fixed PhpDoc for Twig_TokenParserInterface and all other TokenParsers

Discussion
----------

Fixed PhpDoc for Twig_TokenParserInterface and all other TokenParsers
2011-12-26 09:08:00 +01:00
Eugene Serkin fd78ec0bf1 Fixed PhpDoc for Twig_TokenParserInterface and all other TokenParsers 2011-12-26 01:55:03 +02:00
Fabien Potencier b7de8e40c8 added convenience methods to manipulate an array node 2011-12-25 22:34:12 +01:00
Fabien Potencier 591f982b47 Revert "Revert "merged branch arnaud-lb/hash-key-expr (PR #514)""
This reverts commit 99b2c5bf99.
2011-12-24 09:22:35 +01:00
Fabien Potencier 941ce5b672 merged branch javiereguiluz/add-nl2br-notice (PR #568)
Commits
-------

7194b1a Added a notice in the `nl2br` filter documentation about the proper Twig version to use it

Discussion
----------

Added a notice in the `nl2br` filter documentation ...

... about the proper Twig version to use it (1.5)
2011-12-23 11:29:22 +01:00
Javier Eguíluz 7194b1adaa Added a notice in the nl2br filter documentation about the proper Twig version to use it 2011-12-23 10:26:49 +01:00
Fabien Potencier 99b2c5bf99 Revert "merged branch arnaud-lb/hash-key-expr (PR #514)"
This reverts commit 8665c64634, reversing
changes made to 4aba337cda.
2011-12-23 08:59:54 +01:00
Fabien Potencier a555faec40 updated doc 2011-12-22 22:48:48 +01:00
Fabien Potencier ad0b8f0900 updated CHANGELOG 2011-12-22 22:42:44 +01:00
Fabien Potencier 8665c64634 merged branch arnaud-lb/hash-key-expr (PR #514)
Commits
-------

542e9e7 added getKeyValuePairs() on Twig_Node_Expression_Array
3f64f1d added test for hash keys
4bdb3a9 fixed tests
3b1f269 support any expression as hash key

Discussion
----------

Allow hash keys to be any expression

This allows hash keys to be any expression

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

by fabpot at 2011/12/07 02:08:19 -0800

I had not implemented this feature back then because I'm not sure it makes sense to support it in the context of a templating system. I'm still not convinced that this is useful.
2011-12-22 22:41:37 +01:00
Fabien Potencier 4aba337cda added a do tag (closes #446) 2011-12-22 22:36:35 +01:00
Fabien Potencier 5ae6e13aac added doc for the flush tag 2011-12-22 19:32:51 +01:00
Fabien Potencier 95b97eb8da added IDE support for Coda in the doc (closes #566) 2011-12-22 19:25:03 +01:00
Fabien Potencier 46a064d006 tweaked doc (closes #567) 2011-12-22 14:20:20 +01:00
Fabien Potencier c95fe91fc8 replaced zend_error_noreturn calls to zend_error as zend_error_noreturn is not exported (closes #554) 2011-12-22 14:17:59 +01:00
Fabien Potencier fc778405ff merged branch arnaud-lb/ext-fix (PR #565)
Commits
-------

b26d69a removed bogus TSRMLS_CCs

Discussion
----------

Fix strict mode in extension when building in ZTS mode

This removes a few misplaced TSRMLS_CCs causing if() expressions to always evaluate to true. This caused twig_template_get_attributes to always behave as if strict mode were disabled.
2011-12-21 20:27:52 +01:00
Fabien Potencier 26453bffcf fixed typo 2011-12-21 20:17:43 +01:00
Arnaud Le Blanc b26d69af38 removed bogus TSRMLS_CCs 2011-12-21 19:52:05 +01:00
Fabien Potencier 1d6dfad4f5 added a flush tag 2011-12-21 19:34:14 +01:00
Fabien Potencier 2d21619ddc merged branch nikic/fixLoopIncrement (PR #563)
Commits
-------

8255b8b Fix test for previous commit
834ce4c Fix loop increment on some for loops (fix #562)

Discussion
----------

Fix loop increment

PR for #562.
2011-12-21 11:25:50 +01:00
nikic 8255b8b239 Fix test for previous commit 2011-12-21 11:06:03 +01:00
nikic 834ce4c641 Fix loop increment on some for loops (fix #562)
The inner loop incrementing code was not added on for loops where the body was not a Twig_Node (but e.g. a Twig_Node_If)
2011-12-21 11:06:00 +01:00
Fabien Potencier 6f020ccaf4 fixed dump when xdebug.overload_var_dump is not defined in php.ini 2011-12-18 20:54:12 +01:00
Fabien Potencier 4f19c7a04b added support for dynamically named filters and functions 2011-12-18 20:20:35 +01:00
Fabien Potencier 9489136c17 made the dump function registration explicit and disable its output when debug is off 2011-12-18 20:20:35 +01:00
Fabien Potencier 3793740ac5 fixed dump function when the context contains Twig_Template instances 2011-12-18 20:20:35 +01:00
Fabien Potencier 865a7039f8 added a dump function to help debugging templates 2011-12-18 18:30:06 +01:00
Fabien Potencier 11943fbe21 fixed the random function 2011-12-18 15:08:12 +01:00
Fabien Potencier 932a4d8d94 added a nl2br filter 2011-12-18 12:36:07 +01:00
Fabien Potencier 2928191769 added missing documentation for the random function 2011-12-18 12:16:35 +01:00
Fabien Potencier 89a1519e09 added a random function 2011-12-18 11:27:47 +01:00
Fabien Potencier f8b7441e42 added a way to change the default format for the date filter 2011-12-18 11:12:59 +01:00
Fabien Potencier b990868012 merged branch arnaud-lb/ext-crash2 (PR #560)
Commits
-------

9e6f285 fixed crash in twig_template_get_attributes when input is not an array or object

Discussion
----------

Fix crash in twig_template_get_attributes when input is not an array or object

This fixes a crash when the input of twig_template_get_attributes() is not an array or object, and strict mode is enabled.

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

by nikic at 2011/12/16 12:03:21 -0800

Could you maybe place the exception tests in a different method?

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

by arnaud-lb at 2011/12/16 12:13:35 -0800

This method already expects many of its inputs to cause an exception to be thrown (it tests getAttribute() in strict mode, and in many cases the attribute isn't defined). I don't see a real benefit from moving these tests in a separate method in this case.
2011-12-17 08:58:24 +01:00
Arnaud Le Blanc 9e6f285362 fixed crash in twig_template_get_attributes when input is not an array or object 2011-12-16 20:46:37 +01:00