Commit Graph

641 Commits

Author SHA1 Message Date
Fabien Potencier 4f097f272f updated CHANGELOG 2015-07-28 16:13:53 +02:00
Fabien Potencier 4e58c4811a added a recipe about rendering a template stored in a string 2015-07-07 09:46:15 +02:00
Shaun 02a7bd6d7e Remove reference to String loader in docs 2015-07-06 15:43:15 -04:00
Fabien Potencier ff506eb9ab Merge branch '1.x'
* 1.x:
  fixed PHP 5.2 compat
  tweaked previous merge
  add ignore_missing agrument to source function
  updated CHANGELOG
2015-07-03 12:14:51 +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 4756b19b98 Merge branch '1.x'
* 1.x:
  fixed edge case where tests would fail because of a cache issue
  tweaked docs to avoid using an internal method in an example
  deprecated Twig_Environment::clearTemplateCache()
  fixed sandbox disabling when using the include function
  Example about how to rename several blocks
  fixed docs
  Update batch filter docs with arguments
2015-07-03 11:33:29 +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 fe67c5ba3a Merge branch '1.x'
* 1.x:
  updated CHANGELOG
  reverted unexpected change
  fixed previous merge
  Organize and show value types
  Added label for "Whitespace Control" section
  Added note about case sensitivity of logic operators
  Fixed CS
  Fixed error guessing for nested templates
  Travis no longer supports hhvm-nightly
  fixed CS
  Added an example for "and" on if statment
  Updated exception messages for null vars in Twig_Template::getAttribute().
  Use stubs for profiles. Fixes #1660

Conflicts:
	doc/api.rst
2015-06-07 01:29:09 +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
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 56e515b64e Merge branch '1.x'
* 1.x:
  Fix two failed unit tests on Windows:
  updated CHANGELOG
  Reduce the name of the cache directories to 1 character
  clean ups
  bumped version to 1.18.2-DEV
  prepared the 1.18.1 release
  updated CHANGELOG
  Cleanup API - make the compiler happy
  Fixed memory leaks
  tweaked docs about the C extension
  removed an obsolete recipe

Conflicts:
	CHANGELOG
	doc/api.rst
	doc/recipes.rst
	ext/twig/php_twig.h
	lib/Twig/Environment.php
	lib/Twig/NodeTraverser.php
	lib/Twig/Template.php
2015-05-16 16:12:48 +02:00
violuke d2d7ec817b Update empty.rst
Correcting English.
2015-05-11 10:01:11 +01:00
Fabien Potencier 7ee4aec238 tweaked docs about the C extension 2015-03-17 18:21:28 +01:00
Fabien Potencier 72cc7d8081 removed obsolete docs 2015-03-02 18:32:57 +01:00
Fabien Potencier cb732490a3 removed an obsolete recipe 2015-03-02 18:29:18 +01:00
Fabien Potencier 886b863dcb removed the Autoloader as Composer provide one 2015-03-02 17:40:39 +01:00
Fabien Potencier 6c3febca9e removed pre-1.8 autoescape tag syntax, removed true as a valid autoescape strategy 2015-03-02 17:40:38 +01:00
Fabien Potencier 706d659deb drop support for PHP 5.3 and 5.4 2015-03-02 17:40:38 +01:00
Fabien Potencier 176f60d79d removed obsolete Twig_Simple* classes 2015-03-02 17:40:21 +01:00
Fabien Potencier df3d5335fa removed obsolete interfaces 2015-03-02 17:40:20 +01:00
Fabien Potencier f0a81e0e83 dropped support for PHP 5.2 2015-03-02 17:40:20 +01:00
Fabien Potencier bb30b98706 udpated the docs for 2.0 2015-03-02 17:40:20 +01:00
Fabien Potencier 3779435d62 deprecated the String loader 2015-03-02 15:45:22 +01:00
Fabien Potencier a60a522105 feature #1597 added a profiler (fabpot)
This PR was merged into the 1.17-dev branch.

Discussion
----------

added a profiler

This profiler allows to better understand what's going on when rendering templates. It should be used when debug is true only as it adds some overhead.

Here is a sample output in the text format:

```
main 567.04ms/100%
└ index 463.28ms/82%
  └ base 463.24ms/82%
    └ base::block(header)
    └ index::block(content) 306.29ms/54%
    │ └ included 50.18ms/9%
    │ └ included 45.42ms/8%
    │ └ included 35.42ms/6%
    │ └ base::block(content) 104.97ms/19%
    │ │ └ included 34.90ms/6%
    │ └ included 35.84ms/6%
    └ base::block(footer) 156.84ms/28%
      └ included 38.96ms/7%
      └ base::macro(foo)
```

You can also dump a profile in a Blackfire compatible format to [visualise the data as a graph](http://goo.gl/RwNGFH).

A profile is also a great way to be able to list all templates/blocks/macros that were used when rendering a template.

A PR on Symfony (symfony/symfony#13428) integrates this profiler in the Symfony web profiler to replace the current TimedTwigEngine and to add a new Twig panel.

![symfony-web-profiler](https://cloud.githubusercontent.com/assets/47313/5755461/019cd6a4-9ca5-11e4-8762-68e2a709c336.png)

Commits
-------

4408caa added a profiler
2015-01-20 03:09:25 +01:00
Fabien Potencier b40c555f0f fixed CS 2015-01-20 03:07:54 +01:00
Fabien Potencier fc292dda7d minor #1565 Update batch.rst (NAYZO)
This PR was squashed before being merged into the 1.17-dev branch (closes #1565).

Discussion
----------

Update batch.rst

Commits
-------

403736f Update batch.rst
2015-01-20 03:07:23 +01:00
Ala Eddine Khefifi 403736f031 Update batch.rst 2015-01-20 03:07:22 +01:00
Fabien Potencier 4408caae0c added a profiler 2015-01-20 03:04:00 +01:00
SofHad 65b3799dbd Fixed php syntax 2015-01-18 14:12:20 +01:00
Fabien Potencier 01ab6f317b added some more tests for the filename autoescape strategy 2015-01-14 07:56:45 +01:00
Fabien Potencier 4481bf5f38 added an escaping strategy based on the template filename extension 2015-01-13 16:33:59 +01:00
Fabien Potencier 2615ae34dd minor #1581 Adding example with `not for if` (InFog)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Adding example with ``not`` for ``if``

I could not find an example with ``not``, so I added it here.

Commits
-------

4a75e40 Adding example with ``not`` for ``if``
2014-12-25 20:53:02 +01:00
Paul Mallet d5fe41344b Add display information to slice example 2014-12-22 16:39:55 +01:00
Evaldo Junior 4a75e4024e Adding example with `not for if`
I could not find an example with ``not``, so I added it here.
2014-12-16 11:00:43 +01:00
Christian Raue ba04803ed3 fixed alphabetic order in lists of filters and tags 2014-11-10 14:17:24 +01:00
maxstekel 435534ef05 first argument of Twig_Loader_Array must be an array 2014-10-23 11:29:06 +02:00
Fabien Potencier e37fc6b059 updated repo URLs in the docs 2014-10-21 16:58:01 +02:00
Fabien Schurter 882f44b0d3 Correct base template name
The base template name used in $loader1 and $loader2 is actually
"base.html", not "base.twig".
2014-10-16 09:32:46 +02:00
Fabien Potencier 91a3660f7b reordered doc index to match the website 2014-10-16 08:05:34 +02:00
Fabien Potencier 92847ed0d8 fixed table format in docs 2014-10-16 07:50:15 +02:00