Commit Graph

668 Commits

Author SHA1 Message Date
Fabien Potencier 12fb6f88a1 removed versionadded tags in docs 2015-09-06 08:49:46 +02:00
Fabien Potencier c3d92b2cc7 Merge branch '1.x'
* 1.x:
  updated CHANGELOG
  Fix variable names for the deprecation triggering code
  Mark test skipped if cannot write to cache directory.
2015-09-06 08:47:52 +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
Fabien Potencier 3abc195e5f Merge branch '1.x'
* 1.x:
  fix escaping strategy detection based on filename
  OPcache support fix
2015-09-01 07:51: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 962119e8dd Merge branch '1.x'
* 1.x:
  added a note about TwigFiddle
  fixed wrong commit
  removed obsolete comment
2015-08-23 14:35:59 +02:00
Fabien Potencier bc9911e326 added a note about TwigFiddle 2015-08-23 14:22:16 +02:00
Fabien Potencier a089f1e8a7 Merge branch '1.x'
* 1.x:
  simplified tests
  added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates
  tweaked some deprecation messages
  added deprecation notices for deprecated classes
  optimized legacy tests management
  added a way to manage legacy tests in fixtures
  removed usage of deprecated features, marked some tests as being legacy
  added the Symfony PHPUnit bridge to better manage deprecation notices
  added deprecated notices for deprecated features
  added some documentation about deprecation notices
  added a way to trigger deprecation notices for filters and functions
  added deprecation for the raw tag
  added deprecation notices for deprecated tests
  fixed CS
  Optimize the retrieval of reserved macro names
  Remove dead code
  added the raw tag as being deprecated
  replaced obsolete raw tag by verbatim in tests
2015-08-18 15:14:25 +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 9f319e55c7 Merge branch '1.x'
* 1.x:
  fixed typos and CS
  [doc/recipes] Added OPcache support
  Remove broken code
2015-08-15 21:53:57 +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 1506a3a051 removed deprecated _self variable 2015-08-12 16:52:40 +02:00
Fabien Potencier c9501b80a1 deprecated Twig_Template::getEnvironment() 2015-08-12 16:49:10 +02:00
Fabien Potencier e870b1f341 Merge branch '1.x'
* 1.x:
  deprecated _self
  added a base node visitor to make compat between 1.x and 2.x possible
  bumped to 1.20
  added a mention of projects using Twig
  bumped version to 1.19.1-DEV
  prepared the 1.19.0 release
  updated CHANGELOG
  Fixed error guessing in blocks in a child template
  fixed CS
  tweaked docs
  fixed CS
  bumped version to 1.19
  Added support for unconsumed macro arguments
  Added variadic filters, tests, and functions
2015-08-12 16:46:07 +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 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 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 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
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 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