web/konrad/twig.git
12 years agoadded tests for bitwise operators
Fabien Potencier [Tue, 8 May 2012 06:30:42 +0000]
added tests for bitwise operators

12 years agoclarified usage of the dump function (closes #718)
Fabien Potencier [Tue, 8 May 2012 06:23:16 +0000]
clarified usage of the dump function (closes #718)

12 years agoenforced interface when adding tests, filters, functions, and node visitors from...
Fabien Potencier [Fri, 4 May 2012 06:00:53 +0000]
enforced interface when adding tests, filters, functions, and node visitors from extensions

This avoids some hard to find bugs where you use a Twig_Function_Method
for instance for a filter. This is hard to find because the interface is
almost the same but the getSafe() contract is not the same.

12 years agoupdated CHANGELOG
Fabien Potencier [Thu, 3 May 2012 20:31:44 +0000]
updated CHANGELOG

12 years agomerged branch stof/mutable_datetime (PR #717)
Fabien Potencier [Thu, 3 May 2012 20:30:26 +0000]
merged branch stof/mutable_datetime (PR #717)

Commits
-------

a23d4fb Fixed the handling of the timezone for DateTime objects
a164469 Added a failing test demonstrating the bug with DateTime and timezones

Discussion
----------

Mutable datetime

PHP DateTime objects are mutable so changing the timezone when displaying
it affects the following code whereas it does not occur for other
supported formats.

12 years agoFixed the handling of the timezone for DateTime objects
Christophe Coevoet [Thu, 3 May 2012 20:25:04 +0000]
Fixed the handling of the timezone for DateTime objects

12 years agoAdded a failing test demonstrating the bug with DateTime and timezones
Christophe Coevoet [Thu, 3 May 2012 20:20:20 +0000]
Added a failing test demonstrating the bug with DateTime and timezones

PHP DateTime objects are mutable so changing the timezone when displaying
it affects the following code whereas it does not occur for other
supported formats.

12 years agoadded a missing entry in the CHANGELOG
Fabien Potencier [Sat, 28 Apr 2012 07:16:43 +0000]
added a missing entry in the CHANGELOG

12 years agofixed markup in the doc
Fabien Potencier [Fri, 27 Apr 2012 15:49:39 +0000]
fixed markup in the doc

12 years agomerged two doc files
Fabien Potencier [Fri, 27 Apr 2012 15:42:50 +0000]
merged two doc files

12 years agorenamed a doc file
Fabien Potencier [Fri, 27 Apr 2012 15:40:57 +0000]
renamed a doc file

12 years agorefactored the hacking twig doc chapter
Fabien Potencier [Fri, 27 Apr 2012 15:35:26 +0000]
refactored the hacking twig doc chapter

12 years agotweaked doc
Fabien Potencier [Fri, 27 Apr 2012 12:21:26 +0000]
tweaked doc

12 years agoadded a new recipe
Fabien Potencier [Fri, 27 Apr 2012 12:18:22 +0000]
added a new recipe

12 years agofixed embed compilation when used more than once in a template (closes #714)
Fabien Potencier [Fri, 27 Apr 2012 07:16:21 +0000]
fixed embed compilation when used more than once in a template (closes #714)

12 years agomade the autoescape tag argument optional (defaults to 'html')
Fabien Potencier [Wed, 25 Apr 2012 16:22:04 +0000]
made the autoescape tag argument optional (defaults to 'html')

12 years agoadded a note about auto-escaping and the embed tag
Fabien Potencier [Wed, 25 Apr 2012 08:34:12 +0000]
added a note about auto-escaping and the embed tag

We cannot use the parent template to guess the auto-escaping strategy
either as it can be any valid expression, for which we have the real
value only at runtime (auto-escaping happening at compilation time).

12 years agoensured that each template (Twig_Node_Module) is only visited once
Fabien Potencier [Wed, 25 Apr 2012 07:17:16 +0000]
ensured that each template (Twig_Node_Module) is only visited once

12 years agosimplified code
Fabien Potencier [Wed, 25 Apr 2012 06:37:17 +0000]
simplified code

12 years agoadded a way to change the default escaping strategy after creating the Twig environment
Fabien Potencier [Wed, 25 Apr 2012 06:23:58 +0000]
added a way to change the default escaping strategy after creating the Twig environment

12 years agotweaked doc for the escape filter
Fabien Potencier [Wed, 25 Apr 2012 05:35:12 +0000]
tweaked doc for the escape filter

12 years agosimplified usage of the autoescape tag; the only argument is now the escaping strateg...
Fabien Potencier [Wed, 25 Apr 2012 05:30:52 +0000]
simplified usage of the autoescape tag; the only argument is now the escaping strategy or false

12 years agotweaked an error message
Fabien Potencier [Wed, 25 Apr 2012 05:00:14 +0000]
tweaked an error message

12 years agoadded a way to dynamically change the auto-escaping strategy according to the templat...
Fabien Potencier [Wed, 25 Apr 2012 04:25:28 +0000]
added a way to dynamically change the auto-escaping strategy according to the template filename

12 years agochanged the autoescape option to also accept a supported escaping strategy (for BC...
Fabien Potencier [Wed, 25 Apr 2012 04:23:17 +0000]
changed the autoescape option to also accept a supported escaping strategy (for BC, true is equivalent to html)

12 years agofixed CS
Fabien Potencier [Wed, 25 Apr 2012 04:17:05 +0000]
fixed CS

12 years agofixed markup in the doc
Fabien Potencier [Tue, 24 Apr 2012 11:12:09 +0000]
fixed markup in the doc

12 years agomerged branch fabpot/inline (PR #709)
Fabien Potencier [Tue, 24 Apr 2012 11:09:06 +0000]
merged branch fabpot/inline (PR #709)

Commits
-------

07f13df fixed typo
0f623a1 added the parent as an argument to the embed tag (removes the need to use extends)
fab21d8 renamed the inline tag to embed
1b54780 tweaked examples
955726a changed the inline examples to not use even/odd to avoid confustion
fb07f3a renamed indice to index
fafde80 added more info in the docs
2fa8224 added the inline tag

Discussion
----------

added the inline tag

At Sensio, we manage websites with many mostly-static pages that share almost the same structure (with different content of course), but with some subtle differences. After trying many different possibilities (external templates, inheritance, macros, and some ugly ones that I won't even tell you about ;)) to structure our templates, we came to the conclusion that we needed a new concept.

This new concept is implemented via a new tag, `inline`, which I want to include in Twig 1.8 (not for the upcoming 1.7 which is due this week). But before merging this code into master, I want to gather some feedback from the community. One of my questions being: Will you use this new possibility?

I won't tell you more here as the tag is fully documented in the diff.

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

by oojacoboo at 2012-04-23T17:58:59Z

odd/even?  What other potential uses do you see?  I think I can see a couple, but generally speaking, unless it's a content site (ie. blog), the odd/even isn't very useful.  Reusing blocks even with minor customizations on a per page level is highly needed for our development processes, but an odd/even scenario is certainly not.

Maybe I'm missing something here.  What about passing attributes to a block or something?

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

by fabpot at 2012-04-23T18:02:51Z

@oojacoboo odd/even is just an example. Of course, this is not a real use case, this was just an attempt to find an example.

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

by stof at 2012-04-23T18:03:53Z

@oojacoboo there is no reference to odd/even in the code, only in the doc

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

by simensen at 2012-04-23T18:20:10Z

I think that it would be useful in some cases. I can't think of any places I could use it *right now* but I know I've had to jump through hoops on more than a few occasions to get things to work correctly. Being able to keep functionality like this in mind at the design stage might have made things easier in a few of those cases.

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

by lyrixx at 2012-04-23T18:21:34Z

I think it's a good idea.

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

by tyomo4ka at 2012-04-23T18:25:07Z

I think it will be great. Each time when I need to include templat that simple extends another one and replace one small block I think: "Why I should to create new template for it?". Thanks, @fabpot

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

by bmatzner at 2012-04-23T18:28:23Z

Right on. +1

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

by cranberyxl at 2012-04-23T18:40:17Z

I believe the concept is a good one, but the example using even and odd will confuse frontend developers because it's usually used in the context of loops and table striping. even changing it to styleA.twig and styleB.twig would be more understandable.

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

by lyrixx at 2012-04-23T19:01:32Z

@cranberyxl  +1

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

by fabpot at 2012-04-23T19:24:21Z

ok, I've just changed the examples to not used even/odd.

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

by jorgelbg at 2012-04-23T19:27:53Z

I think that the inline tag is a valid concept, but still I can't get it landed on a real case!

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

by sirowl at 2012-04-23T19:35:07Z

As a webdesigner with a steady foundation in CSS I find the term inline very confusing, I had to consult a developer to actually understand what was the idea of the tag as I so heavily associated it with CSS's terminology of inline.
The CSS terminololigy got me on the wrong track in terms of what the tag was supposed to be used for.
I have no good suggestion for a name for it, but inline could probably get very confusing for a lot of webdesigners making use of twig.

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

by fabpot at 2012-04-23T19:41:48Z

@sirowl `inline` was the best term I could come up with but I'm open to any other suggestion.

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

by sirowl at 2012-04-23T19:47:30Z

The best I could come up with is embed, as it is an embedded document of sorts.. or something along those lines.

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

by bschussek at 2012-04-23T19:48:54Z

I like `embed`.

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

by bmatzner at 2012-04-23T19:55:37Z

Hi Fabien, inline makes sense to me, although I understand @sirowl's comment, but I even find the concept quite comparable to the CSS display:block/display:inline logic. @sirowl's suggestion of "embed" would be just as fine, as it's just a matter of learning what this particular tag refers to. The ambiguation against the import tag is probably the most crucial, explaining the advantages of "inline" (or whatever) over doing an import

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

by Baachi at 2012-04-23T20:03:26Z

I lke ```embed```, too.

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

by Nami-Doc at 2012-04-23T20:11:42Z

I like `embed`, but `inline` is fine too.

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

by tijuan at 2012-04-23T20:36:39Z

I like the feature
I like embed

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

by pulse00 at 2012-04-23T20:56:41Z

+1 for `embed`

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

by mickaelandrieu at 2012-04-24T00:35:01Z

I like embed, inline for me is an CSS behavior

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

by matheo at 2012-04-24T04:29:05Z

+1 for `embed`

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

by fabpot at 2012-04-24T05:35:06Z

I've just renamed the `inline` tag to `embed`.

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

by sirowl at 2012-04-24T06:55:17Z

@fabpot agreed, much more clear to me now. Look forward to using it.

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

by pvanliefland at 2012-04-24T07:20:35Z

I would like to use this feature as well

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

by tristanbes at 2012-04-24T07:38:57Z

So if I take another example, to help me understand better

I do have a common structure stated as follows :
   ```
 <body>
    <div class="row">
        <div class="main">
            <div id="homepage">
               {% block content %}
            </div>
       </div>
    </div>
    </body>
```
Let's say for the other pages, the `id="homepage"` is replaced by `id="innerPage"` `id="specialLayout"`

So far I created 3 base template with those changes, so with the new `embed` tag, does this concept fits here or I misunderstood the function of `embed` feature ?

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

by ruian at 2012-04-24T07:47:38Z

@tristanbes with `embed`, you can "include" another twig template and modify directly these differents `block`.
If you want to understand you can read `embed` tests https://github.com/fabpot/Twig/blob/0f623a11129ce28a897dbd5b812241d8b3ea9730/test/Twig/Tests/Fixtures/tags/embed/

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

by samuelmichaud at 2012-04-24T08:02:42Z

Yes ! I will definitely use this ! Thanks

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

by michelsalib at 2012-04-24T08:05:47Z

As @samuelmichaud said we have some uses cases (such as menu generation, breadcrumbs or quick action embedding). So this feature makes total sense.

12 years agomerged branch hason/fix_test5.2 (PR #710)
Fabien Potencier [Tue, 24 Apr 2012 09:25:12 +0000]
merged branch hason/fix_test5.2 (PR #710)

Commits
-------

28bd307 Fixed guess template info for PHP 5.2

Discussion
----------

Fixed guess template info for PHP 5.2

12 years agoFixed guess template info for PHP 5.2
Martin Hasoň [Tue, 24 Apr 2012 08:24:52 +0000]
Fixed guess template info for PHP 5.2

12 years agofixed typo
Fabien Potencier [Tue, 24 Apr 2012 08:36:52 +0000]
fixed typo

12 years agoadded the parent as an argument to the embed tag (removes the need to use extends)
Fabien Potencier [Tue, 24 Apr 2012 06:31:52 +0000]
added the parent as an argument to the embed tag (removes the need to use extends)

12 years agobumped version to 1.8.0-DEV
Fabien Potencier [Tue, 24 Apr 2012 05:50:52 +0000]
bumped version to 1.8.0-DEV

12 years agoprepared the 1.7.0 release
Fabien Potencier [Tue, 24 Apr 2012 05:40:10 +0000]
prepared the 1.7.0 release

12 years agorenamed the inline tag to embed
Fabien Potencier [Tue, 24 Apr 2012 05:34:14 +0000]
renamed the inline tag to embed

12 years agomerged branch hason/travis (PR #633)
Fabien Potencier [Tue, 24 Apr 2012 05:25:17 +0000]
merged branch hason/travis (PR #633)

Commits
-------

e109233 set travis-ci icon to master
623fac0 Fixed test for "dump" function if xdebug>2.2 is loaded
bd89ec8 Added travis build file

Discussion
----------

Added travis build file

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

by stealth35 at 2012-02-14T14:23:44Z

you could add the twig extension install script

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

by stof at 2012-02-14T14:35:30Z

yeah, there should be 2 builds in the matrix, one with the C extension and one without

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

by hason at 2012-02-15T14:46:30Z

I created build file with matrix of builds. One with the C extension and one without. But I don't know why the C extension is not loaded for PHP 5.2.

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

by hason at 2012-02-16T10:29:02Z

@fabpot All tests passed [![Build Status](https://secure.travis-ci.org/hason/Twig.png?branch=travis)](http://travis-ci.org/hason/Twig)

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

by stof at 2012-04-01T10:30:01Z

@fabpot any reason not to merge it ?

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

by drak at 2012-04-02T02:01:44Z

+1, this helps with QA

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

by nikic at 2012-04-02T09:20:07Z

+1

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

by fabpot at 2012-04-20T09:41:50Z

Can you inline the .sh scripts into the travis file directly?

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

by hason at 2012-04-23T21:57:26Z

done

12 years agoset travis-ci icon to master
Martin Hasoň [Mon, 2 Apr 2012 09:20:42 +0000]
set travis-ci icon to master

12 years agoFixed test for "dump" function if xdebug>2.2 is loaded
Martin Hasoň [Thu, 16 Feb 2012 09:55:45 +0000]
Fixed test for "dump" function if xdebug>2.2 is loaded

12 years agoAdded travis build file
Martin Hasoň [Tue, 14 Feb 2012 13:17:30 +0000]
Added travis build file

12 years agotweaked examples
Fabien Potencier [Mon, 23 Apr 2012 19:26:07 +0000]
tweaked examples

12 years agochanged the inline examples to not use even/odd to avoid confustion
Fabien Potencier [Mon, 23 Apr 2012 19:23:37 +0000]
changed the inline examples to not use even/odd to avoid confustion

12 years agorenamed indice to index
Fabien Potencier [Mon, 23 Apr 2012 18:32:33 +0000]
renamed indice to index

12 years agomerged branch hhamon/parser_cleanup (PR #708)
Fabien Potencier [Mon, 23 Apr 2012 18:24:11 +0000]
merged branch hhamon/parser_cleanup (PR #708)

Commits
-------

81a1049 [Parser] removed useless else clause.

Discussion
----------

[Parser] removed useless else clause.

12 years agoadded more info in the docs
Fabien Potencier [Mon, 23 Apr 2012 18:08:03 +0000]
added more info in the docs

12 years agoadded the inline tag
Fabien Potencier [Mon, 23 Apr 2012 11:03:38 +0000]
added the inline tag

12 years ago[Parser] removed useless else clause.
Hugo Hamon [Mon, 23 Apr 2012 16:00:48 +0000]
[Parser] removed useless else clause.

12 years agofixed compatibility with PHP 5.2 and simplify code a bit
Fabien Potencier [Sun, 22 Apr 2012 06:56:25 +0000]
fixed compatibility with PHP 5.2 and simplify code a bit

12 years agofixed template line number in some exceptions
Fabien Potencier [Sat, 21 Apr 2012 20:21:04 +0000]
fixed template line number in some exceptions

12 years agoadded unit tests to prove the issue with the current introspection exception code
Fabien Potencier [Sat, 21 Apr 2012 17:43:26 +0000]
added unit tests to prove the issue with the current introspection exception code

12 years agotweaked the iterable example in the docs
Fabien Potencier [Sat, 21 Apr 2012 13:46:19 +0000]
tweaked the iterable example in the docs

12 years agotweaked the iterable example in the docs
Fabien Potencier [Sat, 21 Apr 2012 05:33:50 +0000]
tweaked the iterable example in the docs

12 years agomerged branch martinml/master (PR #705)
Fabien Potencier [Fri, 20 Apr 2012 18:17:16 +0000]
merged branch martinml/master (PR #705)

Commits
-------

3eecc60 Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibly other cases.

Discussion
----------

Silence chmod() warnings (operation not permitted) when using CIFS

When using chmod() in a CIFS mount (NTFS) in Linux, Twig 1.6.5 in PHP 5.3.3 throws a warning:

    Warning: chmod(): Operation not permitted in /smb/.../Twig/Environment.php on line 1052

There may be other combinations that trigger this warning. Related Symfony issue: https://github.com/symfony/symfony/issues/2125

12 years agofixed doc
Fabien Potencier [Fri, 20 Apr 2012 18:14:01 +0000]
fixed doc

12 years agoupdated CHANGELOG
Fabien Potencier [Fri, 20 Apr 2012 18:12:57 +0000]
updated CHANGELOG

12 years agoremoved the array test and rename the traversable test to iterable
Fabien Potencier [Fri, 20 Apr 2012 18:12:07 +0000]
removed the array test and rename the traversable test to iterable

12 years agomerged branch Seldaek/isarray (PR #700)
Fabien Potencier [Fri, 20 Apr 2012 18:09:05 +0000]
merged branch Seldaek/isarray (PR #700)

Commits
-------

c88f8e5 Micro-optimizations
70cca66 Simplify code
d78ed66 Add traversable test
5fd2f98 Add docs
b2e1675 Add is array test

Discussion
----------

is array/traversable tests

It's sometimes necessary to display arbitrary data to be able to know if we should recurse or not.

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

by stof at 2012-04-13T12:13:11Z

I'm not sure about the need for ``is array``. All Twig functions related to arrays also support traversable objects

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

by Seldaek at 2012-04-13T12:23:32Z

Well, I like to have both for explicitness and also because I would try is array without looking at the docs, and I don't think it's right to make is array return true for traversables.

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

by fabpot at 2012-04-20T09:38:33Z

One of the main goal of Twig is to abstract the "real" type of the variables. We have already discussed the introduction of many tests like these ones and I have always rejected them.

As many people seems to have a need for them (especially for arrays), I would consider adding the `traversable` test. But as @stof said, Twig tries to blur the difference between traversable objects and arrays, so I'm -1 for adding another test for arrays.

`traversable` is probably not the best name for web designers but I don't know what else we can use here.

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

by stof at 2012-04-20T09:41:05Z

In Jinja, there is a built-in test for this using ``iterable``: http://jinja.pocoo.org/docs/templates/#builtin-tests

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

by Seldaek at 2012-04-20T09:41:32Z

Ok. I can live with dropping the array test. Now for the name,  `is forloopable`? I am kind of at a loss as well apart from traversable. I think if it's clearly mentioned in the docs it's ok.

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

by Seldaek at 2012-04-20T09:52:12Z

iterable sounds ok to me, but just as confusing as traversable I guess to the unknowing. A sidenote, if I update the PR, any objection to adding the "undefined" test as well?

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

by fabpot at 2012-04-20T10:01:27Z

Let's use `iterable` as this is what Jinja already uses. Why would you want an `undefined` test as we already have `defined`? (`if foo is not defined` works well enough)

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

by Seldaek at 2012-04-20T11:16:26Z

I just saw jinja had it on that page, and I thought why not add it too? Still not a huge fan of the "not" for negation.

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

by fabpot at 2012-04-20T12:18:17Z

Well, let's first finish the `iterable` test first and let's discuss `undefined` in another PR or issue.

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

by fabpot at 2012-04-20T17:10:28Z

I can finish the PR is you want.

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

by Seldaek at 2012-04-20T17:13:11Z

If you like sure, it's mostly deleting code anyway. I just have to finish some work stuff now..

12 years agoSilence chmod() warnings (operation not permitted) when using CIFS mounts and possibl...
martinml [Fri, 20 Apr 2012 18:01:06 +0000]
Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibly other cases.

12 years agorenamed preserve_safety to preserves_safety to be consisten with needs_context and...
Fabien Potencier [Fri, 20 Apr 2012 17:04:30 +0000]
renamed preserve_safety to preserves_safety to be consisten with needs_context and needs_environment

12 years agomerged branch stof/preserve_safe (PR #684)
Fabien Potencier [Fri, 20 Apr 2012 17:02:27 +0000]
merged branch stof/preserve_safe (PR #684)

Commits
-------

0cbf5a0 Added an option to mark filters as preserving the safeness

Discussion
----------

Added an option to mark filters as preserving the safeness

Closes #678

I haven't written a test for this yet as I don't know how to provide a stub filter (as none of the core filters use this option) for the setup of the testsuite.

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

by fabpot at 2012-04-07T20:15:36Z

@stof: Can you also add some information in the phpdoc with an example so that people understand more easily when and why you would want to use this new option? Thanks.

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

by fabpot at 2012-04-07T20:16:36Z

Also, adding a unit test that demonstrates the bug you had in #678 would be good.

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

by stof at 2012-04-20T08:33:58Z

@fabpot none of the core filters are using this options, so what is the right way to add a test ?

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

by fabpot at 2012-04-20T08:36:26Z

by defining a filter in the test that uses it.

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

by stof at 2012-04-20T08:39:06Z

but is it possible to register a filter from the tests with the custom stuff used by Twig ?

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

by fabpot at 2012-04-20T08:48:06Z

in integrationTest.php, we already have quite a few functions and filters registered. I would just be a matter of adding a new one.

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

by stof at 2012-04-20T16:17:01Z

@fabpot renamed, tested and squashed

12 years agoAdded an option to mark filters as preserving the safeness
Christophe Coevoet [Fri, 20 Apr 2012 14:23:51 +0000]
Added an option to mark filters as preserving the safeness

Closes #678

12 years agoadded an error when defining two blocks with the same name in a template (closes...
Fabien Potencier [Fri, 20 Apr 2012 09:17:22 +0000]
added an error when defining two blocks with the same name in a template (closes #701)

12 years agoadded some missing tests for nested blocks
Fabien Potencier [Fri, 20 Apr 2012 08:53:54 +0000]
added some missing tests for nested blocks

12 years agoadded a note in the documentation about what the C exension does
Fabien Potencier [Wed, 18 Apr 2012 05:19:25 +0000]
added a note in the documentation about what the C exension does

12 years agoadded missing parameters to Twig_Error_Syntax
Fabien Potencier [Mon, 16 Apr 2012 07:04:57 +0000]
added missing parameters to Twig_Error_Syntax

12 years agoMicro-optimizations
Jordi Boggiano [Fri, 13 Apr 2012 13:48:00 +0000]
Micro-optimizations

12 years agoSimplify code
Jordi Boggiano [Fri, 13 Apr 2012 12:22:03 +0000]
Simplify code

12 years agoAdd traversable test
Jordi Boggiano [Fri, 13 Apr 2012 11:05:17 +0000]
Add traversable test

12 years agoAdd docs
Jordi Boggiano [Fri, 13 Apr 2012 10:58:41 +0000]
Add docs

12 years agoAdd is array test
Jordi Boggiano [Fri, 13 Apr 2012 10:57:54 +0000]
Add is array test

12 years agofixed a PHP notice when trying to access a key on a non-object/array variable
Fabien Potencier [Thu, 12 Apr 2012 12:36:25 +0000]
fixed a PHP notice when trying to access a key on a non-object/array variable

12 years agoupdated CHANGELOG
Fabien Potencier [Wed, 11 Apr 2012 14:52:26 +0000]
updated CHANGELOG

12 years agomerged branch Tobion/random-fix (PR #693)
Fabien Potencier [Mon, 9 Apr 2012 16:27:10 +0000]
merged branch Tobion/random-fix (PR #693)

Commits
-------

06361ca added note in changelog
2706412 fixed random function when charset is null

Discussion
----------

Fixed random function when charset is null

Fixed random function when charset is null and the value is an empty string, resulting in an mt_rand error max(-1) is smaller than min(0).
Also fixed a test on windows.

But I don't know why you introduced the special handling for `null === $env->getCharset()`.
Why is that necessary and why is it possible to have a null charset at all? Usually it defaults to utf-8 anyway.

12 years agoadded note in changelog
Tobias Schultze [Mon, 9 Apr 2012 07:30:01 +0000]
added note in changelog

12 years agofixed random function when charset is null
Tobias Schultze [Mon, 9 Apr 2012 07:26:53 +0000]
fixed random function when charset is null

12 years agomerged branch igorw/composer (PR #691)
Fabien Potencier [Sun, 8 Apr 2012 12:20:37 +0000]
merged branch igorw/composer (PR #691)

Commits
-------

72d3c19 [composer] Add branch alias for dev-master, adjust some other things

Discussion
----------

[composer] Add branch alias for dev-master, adjust some other things

* branch alias allows installation of dev-master by requiring 1.7.*, which is important since most packages depend on twig "<2.0.0"
* remove the version field, the version is determined by branch names and tags only
* change license to BSD-3, this is more explicit and the preferred format for BSD licenses

12 years agoenhanced error reporting when the template file is an instance of SplFileInfo
Fabien Potencier [Sun, 8 Apr 2012 12:12:00 +0000]
enhanced error reporting when the template file is an instance of SplFileInfo

12 years ago[composer] Add branch alias for dev-master, adjust some other things
Igor Wiedler [Sun, 8 Apr 2012 12:07:23 +0000]
[composer] Add branch alias for dev-master, adjust some other things

* branch alias allows installation of dev-master by requiring 1.7.*, which is important since most packages depend on twig "<2.0.0"
* remove the version field, the version is determined by branch names and tags only
* change license to BSD-3, this is more explicit and the preferred format for BSD licenses

12 years agoadded a tip in the doc
Fabien Potencier [Sun, 8 Apr 2012 10:58:26 +0000]
added a tip in the doc

12 years agoadded a unit test to demonstrate the need to pass blocks when calling renderBlock...
Fabien Potencier [Sat, 7 Apr 2012 20:40:59 +0000]
added a unit test to demonstrate the need to pass blocks when calling renderBlock|displayBlock

12 years agomerged branch igorw/patch-1 (PR #689)
Fabien Potencier [Sat, 7 Apr 2012 16:15:20 +0000]
merged branch igorw/patch-1 (PR #689)

Commits
-------

11d4c6a [doc] Remove backticks in intro doc

Discussion
----------

[doc] Remove backticks in intro doc

12 years ago[doc] Remove backticks in intro doc
Igor Wiedler [Sat, 7 Apr 2012 15:38:17 +0000]
[doc] Remove backticks in intro doc

12 years agomerged branch markstory/loop-docs (PR #688)
Fabien Potencier [Sat, 7 Apr 2012 14:41:37 +0000]
merged branch markstory/loop-docs (PR #688)

Commits
-------

2a7102d Update docs concerning loop.last.

Discussion
----------

Update docs concerning loop.last.

Add docs for #687. `loop.last` is not defined when looping with conditions.

12 years agoUpdate docs concerning loop.last.
mark_story [Sat, 7 Apr 2012 13:50:44 +0000]
Update docs concerning loop.last.

12 years agoadded some more information about unknown variable/attributes in the doc (closes...
Fabien Potencier [Thu, 5 Apr 2012 20:53:25 +0000]
added some more information about unknown variable/attributes in the doc (closes #685)

12 years agoadded Twig_Environment::mergeGlobals()
Fabien Potencier [Tue, 3 Apr 2012 17:13:43 +0000]
added Twig_Environment::mergeGlobals()

12 years agofixed a regression when a template only extends another one without defining any...
Fabien Potencier [Tue, 3 Apr 2012 17:12:14 +0000]
fixed a regression when a template only extends another one without defining any blocks (closes #683)

12 years agobumped version to 1.7.0-DEV
Fabien Potencier [Tue, 3 Apr 2012 07:56:57 +0000]
bumped version to 1.7.0-DEV

12 years agomade usage of mergeContextWithGlobals in macros
Fabien Potencier [Tue, 3 Apr 2012 07:45:11 +0000]
made usage of mergeContextWithGlobals in macros

12 years agofixed doc markup
Fabien Potencier [Tue, 3 Apr 2012 07:10:53 +0000]
fixed doc markup

12 years agofixed doc markup
Fabien Potencier [Tue, 3 Apr 2012 07:08:32 +0000]
fixed doc markup

12 years agofixed doc indexes
Fabien Potencier [Tue, 3 Apr 2012 07:07:53 +0000]
fixed doc indexes

12 years agorenamed a test
Fabien Potencier [Tue, 3 Apr 2012 07:07:04 +0000]
renamed a test

12 years agoadded compilation checks to avoid misuses of the sandbox tag
Fabien Potencier [Tue, 3 Apr 2012 07:03:41 +0000]
added compilation checks to avoid misuses of the sandbox tag

12 years agofixed Twig unit tests when a template must throw an exception
Fabien Potencier [Tue, 3 Apr 2012 06:59:31 +0000]
fixed Twig unit tests when a template must throw an exception

12 years agoenhance error reporting in Twig unit tests
Fabien Potencier [Tue, 3 Apr 2012 06:49:35 +0000]
enhance error reporting in Twig unit tests

12 years agoadded doc for the sandbox tag
Fabien Potencier [Tue, 3 Apr 2012 06:08:55 +0000]
added doc for the sandbox tag

12 years agoadded a note about sandbox policy checks in the doc (refs #677)
Fabien Potencier [Tue, 3 Apr 2012 05:32:06 +0000]
added a note about sandbox policy checks in the doc (refs #677)

12 years agofixed filesystem loader freshness logic for high traffic websites (closes #682)
Fabien Potencier [Tue, 3 Apr 2012 05:20:03 +0000]
fixed filesystem loader freshness logic for high traffic websites (closes #682)

12 years agobumped version to 1.6.4-DEV
Fabien Potencier [Mon, 2 Apr 2012 17:45:40 +0000]
bumped version to 1.6.4-DEV

12 years agoprepared the 1.6.4 release
Fabien Potencier [Mon, 2 Apr 2012 17:42:18 +0000]
prepared the 1.6.4 release