Permalink
Commits on Dec 7, 2011
  1. prepared the 1.4.0 release

    committed Dec 7, 2011
Commits on Dec 6, 2011
  1. merged branch duo-criativa/master (PR #544)

    Commits
    -------
    
    11b8689 Refactoring: using && instead of nested if's
    7aa6757 Bug correction: Parsing integers large than PHP_INT_MAX was generating trucated token values.
    046e4ff Bug correction: Parsing integers large than PHP_INT_MAX was generating trucated token values.
    
    Discussion
    ----------
    
    Fixed bug that was trucating integers large then PHP_INT_MAX
    
    The following code
    
    {% set sizes = [7077888, 452984832, 28991029248, 1855425871872, 9223372036854775807] %}
    {% for i in sizes %}
       {{ i }}
    {% endfor %}
    
    was generating the following output
    
    7077888
    452984832
    2147483647
    2147483647
    2147483647
    
    With the fix, the output looks like the following on Ubuntu 11.04
    
    7077888
    452984832
    28991029248
    1855425871872
    9.2233720368548E+18
    committed Dec 6, 2011
Commits on Dec 3, 2011
Commits on Dec 2, 2011
  1. merged branch hason/arrayloader (PR #542)

    Commits
    -------
    
    16d7800 fixed a crash when an object with __toString() method is passed as template name
    
    Discussion
    ----------
    
    fixed a crash when an object with __toString() method is passed as templ...
    
    ...ate name
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/12/01 03:58:47 -0800
    
    Not sure about this one as the phpdoc clearly state that the name is a string. Do you have a specific user case in mind?
    
    ---------------------------------------------------------------------------
    
    by hason at 2011/12/01 04:26:47 -0800
    
    I use the class "Twig_Loader_Chain" as template loader in Symfony2 application. One of the embeded loaders is "Twig_Loader_Array". In Symfony2 is used "Symfony\Component\Templating\TemplateReferenceInterface" for internal representation of a template and it causes a crash.
    committed Dec 2, 2011
Commits on Dec 1, 2011
  1. Bug correction: Parsing integers large than PHP_INT_MAX was generatin…

    …g trucated token values.
    ribeiropaulor committed Dec 1, 2011
  2. Bug correction: Parsing integers large than PHP_INT_MAX was generatin…

    …g trucated token values.
    ribeiropaulor committed Dec 1, 2011
Commits on Nov 29, 2011
  1. fixed markup in doc

    committed Nov 29, 2011
Commits on Nov 27, 2011
  1. prepared the 1.4.0-RC2 release

    committed Nov 27, 2011
  2. merged branch arnaud-lb/twig-escape-filter-opt (PR #537)

    Commits
    -------
    
    7b8d476 optimized twig_escape_filter
    
    Discussion
    ----------
    
    Optimized twig_escape_filter
    
    This optimizes the part of twig_escape_filter that checks if the charset is supported by htmlspecialchars.
    
    This uses a static variable to avoid initializing the charsets array each time the function is called; and does a hash lookup instead of array search (saves a function call too).
    
    The optimized version takes 66% less time that the original version on html escaping :) (no difference on js escaping).
    committed Nov 27, 2011
  3. optimized twig_escape_filter

    uses a static variable to avoid initializing the charsets array each
    time the function is called; and does a hash lookup instead of array
    search (saves a function call too).
    arnaud-lb committed Nov 27, 2011
Commits on Nov 25, 2011
  1. fixed a crash under certain versions of PHP when an object with a __t…

    …oString() method is used with htmlspecialchars
    committed Nov 25, 2011
Commits on Nov 23, 2011
  1. renamed an internal class

    committed Nov 23, 2011
  2. made a small speed optimization

    committed Nov 23, 2011
  3. fixed unit tests due to a difference between the PHP and C versions o…

    …f Twig_Template::getAttribute()
    committed Nov 23, 2011
  4. merged branch arnaud-lb/ext (PR #530)

    Commits
    -------
    
    569f782 fix ZTS build
    1606910 Fix undefined behavior
    0ce8d3c Convert item argument to string
    d807981 don't try to access non public property or method
    7e566b8 test twig_template_get_attributes
    
    Discussion
    ----------
    
    twig_template_get_attributes tests and fixes
    
    This enables testing of twig_template_get_attributes (every TemplateTest test is ran against twig_template_get_attributes too) and fixes some bugs I've found.
    
    There is still 3 failing tests due to a difference of how twig_template_get_attributes and Twig_Template::getAttribute use Twig_Template::$cache.
    
    Twig_Template::getAttribute doesn't cache properties, and twig_template_get_attributes expects $cache[$class]['properties'] to be set if $cache[$class] is set. So twig_template_get_attributes can fail if the cache is already populated by Twig_Template::getAttribute.
    committed Nov 23, 2011
  5. fix ZTS build

    arnaud-lb committed Nov 23, 2011
  6. Fix undefined behavior

    The callbacks are expected to return an integer, and returning void
    instead was triggering weird bugs
    
    I've also removed the casts to ensure that the signatures are compatible
    arnaud-lb committed Nov 23, 2011
  7. Convert item argument to string

    This fixes a crash in some cases and repeated conversions
    arnaud-lb committed Nov 22, 2011
  8. tweaked CHANGELOG

    committed Nov 23, 2011
  9. updated Twig ext version

    committed Nov 23, 2011
  10. merged branch arjenjb/master (PR #528)

    Commits
    -------
    
    c65be3e Pass around the TSRM
    09d3095 Moved zval declaration
    c941552 Removed globals
    ffb2460 Added config.w32 for windows builds
    
    Discussion
    ----------
    
    Fixed compilation on windows
    committed Nov 23, 2011
  11. merged branch derickr/master (PR #526)

    Commits
    -------
    
    c4a7d19 Merge branch 'master' of github.com:derickr/twig-ext
    7d37d66 Make the extension ZTS-proof.
    9879ca2 Merge branch 'master' of github.com:derickr/twig-ext
    40ec671 Fixed name in license.
    
    Discussion
    ----------
    
    Added ZTS (windows TS) support
    
    Hi!
    
    Seemed that since last time I tested, I forgot to sprinkle in some TSRMLS calls all over the place for ZTS support.
    This pull request pulls that in, as well as my previous name-in-license change.
    
    Derick
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/11/21 03:19:09 -0800
    
    @derickr: Now that the extension is in the Twig repo, can you work there directly so that we can avoid the merge commits?
    
    ---------------------------------------------------------------------------
    
    by derickr at 2011/11/21 03:22:54 -0800
    
    On Mon, 21 Nov 2011, Fabien Potencier wrote:
    
    > @derickr: Now that the extension is in the Twig repo, can you work there directly so that we can avoid the merge commits?
    
    Will do that form now on.
    
    Derick
    
    ---------------------------------------------------------------------------
    
    by stealth35 at 2011/11/21 04:42:14 -0800
    
    @derickr could you add the `config.w32`, and fix the `php_twig.h` ?
    
    ---------------------------------------------------------------------------
    
    by stealth35 at 2011/11/21 07:03:53 -0800
    
    You also need to fix `php_twig.h`, like :
    
    ``` c
    ZEND_BEGIN_MODULE_GLOBALS(twig)
    	long global_value;
    ZEND_END_MODULE_GLOBALS(twig)
    ```
    
    and move `zval *tmp_self_cache;` ([@L828][1]) in the top of the function (after `zval *ret = NULL;` ([@L708][2]) for example)
    
    Now build seem to be OK, all tests pass under Windows
    
    I have a complied version if some people are interest to testing :
    https://github.com/downloads/stealth35/stealth35.github.com/php_twig-5.3-vc9-x86.zip
    
    [1]: https://github.com/derickr/Twig/blob/c4a7d1983dab7e2818cca3c4896704f4fce7becc/ext/twig/twig.c#L828
    [2]: https://github.com/derickr/Twig/blob/c4a7d1983dab7e2818cca3c4896704f4fce7becc/ext/twig/twig.c#L708
    
    ---------------------------------------------------------------------------
    
    by stealth35 at 2011/11/21 07:06:42 -0800
    
    @fabpot any plan for the version number ? actually it's v0.0.1, sould it be the same as Twig ?
    committed Nov 23, 2011
  12. merged branch Tobion/patch-1 (PR #529)

    Commits
    -------
    
    4802f69 fixing and improving PHPDoc in Template.php
    
    Discussion
    ----------
    
    fixing and improving PHPDoc in Template.php
    committed Nov 23, 2011
Commits on Nov 22, 2011
Commits on Nov 21, 2011
  1. Pass around the TSRM

    arjenjb committed Nov 21, 2011
  2. Moved zval declaration

    arjenjb committed Nov 21, 2011
  3. Removed globals

    arjenjb committed Nov 21, 2011