Permalink
Commits on Apr 24, 2012
  1. prepared the 1.7.0 release

    committed Apr 24, 2012
  2. 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
    committed Apr 24, 2012
Commits on Apr 23, 2012
  1. set travis-ci icon to master

    hason committed Apr 2, 2012
  2. Added travis build file

    hason committed Feb 14, 2012
  3. merged branch hhamon/parser_cleanup (PR #708)

    Commits
    -------
    
    81a1049 [Parser] removed useless else clause.
    
    Discussion
    ----------
    
    [Parser] removed useless else clause.
    committed Apr 23, 2012
Commits on Apr 22, 2012
Commits on Apr 21, 2012
Commits on Apr 20, 2012
  1. 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: symfony/symfony#2125
    committed Apr 20, 2012
  2. fixed doc

    committed Apr 20, 2012
  3. updated CHANGELOG

    committed Apr 20, 2012
  4. 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..
    committed Apr 20, 2012
  5. Silence chmod() warnings (operation not permitted) when using CIFS mo…

    …unts and possibly other cases.
    martinml committed Apr 20, 2012
  6. renamed preserve_safety to preserves_safety to be consisten with need…

    …s_context and needs_environment
    committed Apr 20, 2012
  7. 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
    committed Apr 20, 2012
Commits on Apr 18, 2012
Commits on Apr 16, 2012
Commits on Apr 13, 2012
  1. Micro-optimizations

    Seldaek committed Apr 13, 2012
  2. Simplify code

    Seldaek committed Apr 13, 2012
  3. Add traversable test

    Seldaek committed Apr 13, 2012
  4. Add docs

    Seldaek committed Apr 13, 2012
  5. Add is array test

    Seldaek committed Apr 13, 2012
Commits on Apr 12, 2012
Commits on Apr 11, 2012
  1. updated CHANGELOG

    committed Apr 11, 2012
Commits on Apr 9, 2012
  1. 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.
    committed Apr 9, 2012
  2. added note in changelog

    Tobion committed Apr 9, 2012