Commit Graph

1846 Commits

Author SHA1 Message Date
Fabien Potencier ff724c81ca merged branch tucksaun/fix-5.2-TSRM (PR #1037)
This PR was merged into the master branch.

Discussion
----------

Revert "merged branch pierrejoye/master (PR #855)"

This reverts commit 347bc81d6e

This commit make compilation failed for PHP5.2 with thread-safe enabled (see https://travis-ci.org/fabpot/Twig/jobs/5523865)

Commits
-------

4383388 Revert "merged branch pierrejoye/master (PR #855)"
2013-03-22 16:32:12 +01:00
Tugdual Saunier 438338827b Revert "merged branch pierrejoye/master (PR #855)"
This reverts commit 347bc81d6e, reversing
changes made to 5d7baaf767.
2013-03-22 16:25:51 +01:00
Fabien Potencier 0bf57a8c9a merged branch specialguest/patch-1 (PR #1034)
This PR was merged into the master branch.

Commits
-------

c6ef23a Update striptags.rst

Discussion
----------

Update striptags.rst

Hello

I just changed
{% some_html|striptags %}
to
{{ some_html|striptags }}

Regards

Julien
2013-03-22 12:30:55 +01:00
specialguest c6ef23ab1d Update striptags.rst 2013-03-18 15:20:21 +01:00
Fabien Potencier ba67e2cf8e merged branch pborreli/typos (PR #1028)
This PR was merged into the master branch.

Commits
-------

49488b8 Fixed typos

Discussion
----------

Fixed typos
2013-03-10 08:23:01 +01:00
Pascal Borreli 49488b8f24 Fixed typos 2013-03-10 02:06:44 +00:00
Fabien Potencier b6c2171579 merged branch carlwitt/patch-1 (PR #1022)
This PR was merged into the master branch.

Commits
-------

59d0eed Update merge.rst

Discussion
----------

Update merge.rst

Typo in first line:
The merge filter merges an array with [removed: the] another array
2013-03-07 07:57:14 +01:00
carlwitt 59d0eed9f7 Update merge.rst
Typo in first line:
The merge filter merges an array with [removed: the] another array
2013-03-04 10:54:34 +01:00
Fabien Potencier 39d94faabc fixed phpdoc 2013-02-28 15:08:49 +01:00
Fabien Potencier bc30d9b7e2 merged branch Tobion/buildquery (PR #1009)
This PR was squashed before being merged into the master branch (closes #1009).

Commits
-------

fcf9525 let url_encode filter also accept array of query parameters

Discussion
----------

let url_encode filter also accept array of query parameters

BC break: no
feature addition: yes
tests pass: yes
documentation: yes

This is also supported in Jinja and so it's consistent: [jinja urlencode](http://modular.math.washington.edu/home/wstein/www/home/bjarke/sage-4.4.4/local/LIB/python/site-packages/Jinja-1.2-py2.6-linux-x86_64.egg/docs/html/builtins.html)
2013-02-26 14:03:39 +01:00
Tobias Schultze fcf9525dc3 let url_encode filter also accept array of query parameters 2013-02-26 14:03:39 +01:00
Fabien Potencier 7b11c6fd5e Merge remote-tracking branch 'lyrixx/feat-batch-ceil'
* lyrixx/feat-batch-ceil:
  Ceil the size in batch filter

Conflicts:
	test/Twig/Tests/Fixtures/filters/batch.test
2013-02-26 14:02:07 +01:00
Fabien Potencier 933d2f922c merged branch Felds/optimize-batch (PR #1007)
This PR was merged into the master branch.

Commits
-------

ccf3cd1 optimize batch function and add tests

Discussion
----------

Optimize batch function and add tests

see https://github.com/fabpot/Twig/commit/a50bc8c95be668c35cda5a6efc6a1e8413d52670#commitcomment-2665059
2013-02-26 13:59:54 +01:00
Fabien Potencier 4458a2cb66 merged branch minchal/master (PR #1013)
This PR was merged into the master branch.

Commits
-------

c82308a deprecated use, -4 files to include.

Discussion
----------

Depraceted use of Twig_Filter_Function in Core Extension

Simple fix, that reduces included files count by 4 (in default configuration).
2013-02-25 07:01:12 +01:00
Michał Pawłowski c82308ace4 deprecated use, -4 files to include. 2013-02-25 02:03:01 +01:00
Fabien Potencier 214385dccf removed unneeded PHPdoc tags 2013-02-24 22:41:17 +01:00
Grégoire Pineau 50f5271ef0 Ceil the size in batch filter 2013-02-22 16:02:01 +01:00
Luiz “Felds” Liscia ccf3cd1c81 optimize batch function and add tests 2013-02-21 12:11:54 -03:00
Fabien Potencier 15336c154c ordered tags, filters, functions, and tests in doc indexes 2013-02-21 07:47:52 +01:00
Fabien Potencier a50bc8c95b added a batch filter 2013-02-21 07:38:58 +01:00
Fabien Potencier ac86c6368c changed an exception to be consistent with other ones (and also to better help debugging problems) 2013-02-17 20:51:08 +01:00
Fabien Potencier 72c8bb73e9 bumped version to 1.12.3-DEV 2013-02-09 19:37:02 +01:00
Fabien Potencier a56f7405be prepared the 1.12.2 release v1.12.2 2013-02-09 19:21:53 +01:00
Fabien Potencier 01bf732b8b updated CHANGELOG 2013-02-08 22:03:10 +01:00
Fabien Potencier b5438c2745 added some unit tests for previous merge 2013-02-08 21:59:58 +01:00
Fabien Potencier fa0d1eec43 added some missing tests 2013-02-08 21:53:22 +01:00
Fabien Potencier 6a3a42a30e merged branch andrewjbaker/force-timezone (PR #964)
This PR was merged into the master branch.

Commits
-------

999b1c4 Force timezone setting in date filter

Discussion
----------

Force timezone setting in date filter

In instances where the $time parameter to the DateTime ctor includes a timezone, the $timezone argument is ignored. This functionality extends to the date filter.

http://uk3.php.net/manual/en/datetime.construct.php

"The $timezone parameter and the current timezone are ignored when the $time parameter either is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00)."

Accepting this pull request is dependent on whether the desired functionality of the date filter should honour the PHP way of doing things, or the more logical and natural functionality anticipated by a Twig template designer; always ensuring the timezone passed into the date filter is applied.
2013-02-08 20:01:59 +01:00
Fabien Potencier 8b569e49a1 added a note about how to use quotes in strings (closes #973) 2013-02-08 19:58:08 +01:00
Fabien Potencier d13027d163 fixed globals when getGlobals is called early on (closes #990) 2013-02-08 18:01:47 +01:00
Fabien Potencier b699ea1e87 merged branch deadbeef84/getglobals-before-addglobal-bug (PR #990)
This PR was merged into the master branch.

Commits
-------

667b274 Added unit test for bug when calling getGlobals() before addGlobal() on Twig_Environment.

Discussion
----------

Bug when calling getGlobals() before addGlobal() on Twig_Environment.

There seems to be an issue when calling getGlobals() before addGlobal(), the globals wont get updated. It doesn't seem to matter if the global existed before the call to getGlobals(). An update of the globals can be forced by calling an additional getGlobals() after the addGlobal() call.

I believe the problem has something to do with runtimeInitialized/extensionInitialized being set to true during rendering, but globals don't get updated during that phase.

Not sure how to fix it so I'm just sending you a unit test showcasing the bug.
2013-02-08 17:36:01 +01:00
Fabien Potencier a357971d49 merged branch lyrixx/patch-5 (PR #989)
This PR was merged into the master branch.

Commits
-------

e2a068d [Doc] Updated template_from_string to use include function

Discussion
----------

[Doc] Updated template_from_string to use include function

instead of include tag
2013-02-08 17:34:13 +01:00
Jesper Ek 667b274b0d Added unit test for bug when calling getGlobals() before addGlobal() on Twig_Environment. 2013-02-08 00:08:43 +01:00
Grégoire Pineau e2a068d49b [Doc] Updated template_from_string to use include function
instead of include tag
2013-02-06 11:10:34 +01:00
Fabien Potencier c6445fb5cd merged branch fabpot/first-last (PR #977)
This PR was merged into the master branch.

Commits
-------

f8d4db4 added the first and last filters (closes #951)

Discussion
----------

added the first and last filters (closes #951)

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

by acasademont at 2013-01-26T20:45:23Z

👍 great! Using twig_slice is a nice thing, we can have string and traversable objects work also with the new filters

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

by jankramer at 2013-01-30T17:39:31Z

👍 Was actually just looking for this :) When do you think you'll merge this feature into master?
2013-02-01 10:44:45 +01:00
Fabien Potencier 81af6a1fd1 removed list of built-in items in the docs in favor of a link (easier to maintain and better for discoverability) 2013-01-31 11:19:12 +01:00
Fabien Potencier f2c95b34da merged branch javiereguiluz/doc_fixes (PR #982)
This PR was merged into the master branch.

Commits
-------

aac6cb6 Fixes and minor additions to the docs.

Discussion
----------

Fixes and minor additions to the docs.
2013-01-31 09:44:01 +01:00
Javier Eguiluz aac6cb613c Fixes and minor additions to the docs. 2013-01-31 09:30:58 +01:00
Fabien Potencier eaadcca54b merged branch eXtreme/patch-1 (PR #978)
This PR was merged into the master branch.

Commits
-------

8f28e78 Missing code-block in doc/templates.rst

Discussion
----------

Missing code-block in doc/templates.rst

Little tweak for docs.
2013-01-27 17:32:04 +01:00
Jacek Jędrzejewski 8f28e7890e Missing code-block in doc/templates.rst 2013-01-27 11:29:20 +01:00
Fabien Potencier f8d4db4107 added the first and last filters (closes #951) 2013-01-26 16:59:11 +01:00
Fabien Potencier 5218db7796 added an exception when trying to render a template when no loader has been set (closes #975) 2013-01-26 16:09:24 +01:00
Fabien Potencier 88cefd3712 tweaked previous merge 2013-01-26 15:57:10 +01:00
Fabien Potencier c3a9c53882 merged branch rybakit/constant (PR #966)
This PR was merged into the master branch.

Commits
-------

a1b7ec5 Tweak twig_constant()

Discussion
----------

Tweak twig_constant()

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

by Tobion at 2013-01-16T10:52:56Z

Why is it better? The old version returns earlier.

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

by rybakit at 2013-01-16T11:25:39Z

It's better for several reasons, imho:
1. Negation has gone, which is better for perception
2. Single function exit point
3. The same functionality in less code

And what do you mean by "The old version returns earlier"?

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

by Tobion at 2013-01-16T13:33:22Z

It means the old version uses a variable less and we prefer early return statements when possible.

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

by rybakit at 2013-01-16T14:24:26Z

@Tobion, but how could it be "earlier"? In both cases the ```return``` statement goes exactly after the condition check:

1)
```php
if (!$object) {                   // 1. check condition
    return constant($constant);   // 2. return result
}
```
2)
```php
if ($object) {                    // 1. check condition
    // ...
}

return constant($constant);       // 2. return result
```
Do you want to say that case 1) is faster?
2013-01-26 15:56:04 +01:00
Fabien Potencier 93c6a8dedc merged branch iamdto/master (PR #969)
This PR was merged into the master branch.

Commits
-------

9d25425 Fixed typo that messes up with syntax highlighting

Discussion
----------

[Documentation] Fixed typo
2013-01-18 10:58:04 +01:00
iamdto 9d25425d95 Fixed typo that messes up with syntax highlighting 2013-01-18 10:43:17 +01:00
Fabien Potencier 3225226e0b removed SVN instructions 2013-01-16 14:37:25 +01:00
Fabien Potencier e8799d6807 merged branch bamarni/patch-1 (PR #967)
This PR was merged into the master branch.

Commits
-------

d5de5e6 [doc] Installation - recommended Composer instead of tarball

Discussion
----------

[doc] Installation - recommended Composer instead of tarball
2013-01-16 14:36:45 +01:00
Bilal Amarni d5de5e6d3b [doc] Installation - recommended Composer instead of tarball 2013-01-16 14:17:17 +01:00
Eugene Leonovich a1b7ec56e6 Tweak twig_constant() 2013-01-16 09:40:49 +01:00
Fabien Potencier 2a7d317cf9 bumped version to 1.12.2-DEV 2013-01-15 21:09:30 +01:00