Commit Graph

810 Commits

Author SHA1 Message Date
Matthias Althaus 57cd302f50 [DOC] Fixed typos in advanced.rst
There are two typos of `Interace`. Although it sounds cool, `Interface` works better for copy and paste.
2016-01-07 22:43:13 +01:00
Possum 0f5f9aaf2a Typo in doc 2015-11-05 10:22:46 +01:00
Christian Raue 2660286d28 fixed Twig_Extension_GlobalsInterface name in comments 2015-11-02 13:15:25 +01:00
Fabien Potencier e3a325f249 deprecated Twig_ExtensionInterface::getGlobals() 2015-10-29 16:13:49 -07:00
Fabien Potencier 9774f4f1a4 deprecated Twig_ExtensionInterface::initRuntime() 2015-10-25 15:48:46 +01:00
Fabien Potencier eac8c0cd3f removed obsolete documentation about requiring classes 2015-10-21 08:17:22 +02:00
Fabien Potencier 38029206d2 added a note about using .. and | together 2015-10-12 09:39:52 +02:00
Fabien Potencier 2b6cfc01aa fixed recipe 2015-09-13 18:56:37 +02:00
Fabien Potencier b673f65d34 feature #1823 rewrote the recipes about APC and opcache to avoid deprecation notices (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

rewrote the recipes about APC and opcache to avoid deprecation notices

Commits
-------

96a54b3 added an option to force PHP bytecode invalidation when writing a compiled template into the cache
e9b0802 rewrote the recipes about APC and opcache to avoid deprecation notices
2015-09-13 13:17:46 +02:00
Fabien Potencier 77fed4e659 added a recipe about how to render a template stored as a string 2015-09-13 12:37:19 +02:00
Fabien Potencier 96a54b3f40 added an option to force PHP bytecode invalidation when writing a compiled template into the cache 2015-09-13 12:26:27 +02:00
Fabien Potencier e9b08026b3 rewrote the recipes about APC and opcache to avoid deprecation notices 2015-09-13 12:12:56 +02:00
Fabien Potencier b5c7f5cd5a added a note about Twig_Loader_String alternatives 2015-09-13 08:53:43 +02:00
Fabien Potencier 0157315e59 deprecated Twig_Environment::getTemplateClassPrefix 2015-09-12 15:34:51 +02:00
Fabien Potencier 4d6d3a5944 fixed deprecation docs 2015-09-11 16:58:04 +02:00
Fabien Potencier cacfb069b2 added a cache interface for templates 2015-09-11 16:24:57 +02:00
Fabien Potencier 542dd3acc0 feature #1795 Traversable support for 'replace', 'merge' and 'sort' (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

Traversable support for 'replace', 'merge' and 'sort'

Add traversable support to:
* replace
* merge
* sort

Other changes:
* Removes some not need checks
* ~~Make unit test skip if it cannot write to cache because of the user running the test~~
* Tests added for traversable support
* Doc updates

Deprecating:
I think the undocumented (and multibyte not supported) use of `replace(string, string)` can be removed in Twig 2.0.
Adding MB support and documentation of the feature was turned down (https://github.com/twigphp/Twig/pull/1618)
However removing it is a BC break (https://github.com/twigphp/Twig/pull/1445#issuecomment-48746926)

Commits
-------

2a17303 Mark test skipped if cannot write to cache directory.
2015-09-06 08:43:16 +02:00
Possum 2a17303601 Mark test skipped if cannot write to cache directory.
Add Traversable support for replace, sort and merge filters.
2015-08-28 11:14:03 +02:00
Alexander Vasilyev 2c4af24b20 OPcache support fix 2015-08-27 09:47:21 +02:00
Fabien Potencier bc9911e326 added a note about TwigFiddle 2015-08-23 14:22:16 +02:00
Fabien Potencier 56c7382775 added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates 2015-08-18 13:34:47 +02:00
Fabien Potencier bd87ba8ad0 added some documentation about deprecation notices 2015-08-18 13:34:46 +02:00
Fabien Potencier c27b04c9d6 added the raw tag as being deprecated 2015-08-15 23:53:21 +02:00
Fabien Potencier af129b2f75 fixed typos and CS 2015-08-13 14:50:40 +02:00
Alexander Vasilyev 1f3fb9a178 [doc/recipes] Added OPcache support 2015-08-13 14:49:08 +02:00
Fabien Potencier c9501b80a1 deprecated Twig_Template::getEnvironment() 2015-08-12 16:49:10 +02:00
Fabien Potencier 5514c8ee80 deprecated _self 2015-08-12 11:08:46 +02:00
Fabien Potencier 881fb63bf7 added a base node visitor to make compat between 1.x and 2.x possible 2015-08-11 15:38:01 +02:00
Fabien Potencier e375c9c562 added a mention of projects using Twig 2015-08-04 16:19:10 +02:00
Fabien Potencier 0828c0345a tweaked docs 2015-07-05 10:48:49 +02:00
Fabien Potencier e007c178ec feature #1699 Added variadic filters, tests, and functions (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Added variadic filters, tests, and functions

Replaces #1317

```php
$env->addFunction(new Twig_SimpleFunction('foo', function ($a1, array $args = array()) {
}, array('is_variadic' => true));
```
```jinja
{{ foo(1, 2, a="a", b="b") }}
{# foo(1, array(0 => 2, "a" => "a", "b" => "b")); #}
```

Commits
-------

c78656a Added variadic filters, tests, and functions
2015-07-05 10:27:16 +02:00
Fabien Potencier 056bb5dade fixed CS 2015-07-05 10:26:11 +02:00
Fabien Potencier 5020747987 feature #1659 Added support for unconsumed macro arguments (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Added support for unconsumed macro arguments

Fixes #1159 and supplements #1699

Commits
-------

7f00cb9 Added support for unconsumed macro arguments
2015-07-05 10:12:21 +02:00
Fabien Potencier 641090378d tweaked previous merge 2015-07-03 11:46:19 +02:00
Valeriy Trubachev afa93586bc add ignore_missing agrument to source function 2015-07-03 11:44:24 +02:00
Fabien Potencier d472fcc9bd tweaked docs to avoid using an internal method in an example 2015-07-03 11:30:18 +02:00
Fabien Potencier 61eb80b089 deprecated Twig_Environment::clearTemplateCache() 2015-07-03 11:29:18 +02:00
Pierre-Yves Guerder 8af1355e43 Example about how to rename several blocks
It was unclear to me how to rename more than 1 imported block. I had to look into the source code to find that, so I add it to the documentation.
2015-07-03 09:00:13 +02:00
Fabien Potencier 7823014351 fixed docs 2015-07-03 08:59:01 +02:00
Alexey Malihin b66821e861 Update batch filter docs with arguments 2015-07-03 08:57:29 +02:00
Fabien Potencier d0b71307d6 fixed previous merge 2015-06-07 01:22:13 +02:00
Kevin Simper 0a46d06069 Organize and show value types 2015-06-07 01:19:31 +02:00
Martin Hasoň 7f00cb9d10 Added support for unconsumed macro arguments 2015-06-02 21:17:27 +02:00
Martin Hasoň c78656a8fb Added variadic filters, tests, and functions 2015-06-02 21:16:57 +02:00
Fabien Potencier 5f201abce5 minor #1703 Added note about case sensitivity of logic operators (biozshock)
This PR was merged into the 1.x branch.

Discussion
----------

Added note about case sensitivity of logic operators

Commits
-------

29986a9 Added note about case sensitivity of logic operators
2015-06-02 16:47:56 +02:00
Ulf df9da8e858 Added label for "Whitespace Control" section 2015-06-02 16:46:05 +02:00
Artem Lopata 29986a9c4c Added note about case sensitivity of logic operators 2015-06-02 15:11:17 +03:00
Fabien Potencier c55e60394c fixed CS 2015-05-16 16:14:08 +02:00
Evaldo Junior 2698a42284 Added an example for "and" on if statment 2015-05-16 16:13:37 +02:00
Fabien Potencier 7ee4aec238 tweaked docs about the C extension 2015-03-17 18:21:28 +01:00