Permalink
Switch branches/tags
Commits on Nov 27, 2011
  1. prepared the 1.4.0-RC2 release

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

    fabpot committed Nov 27, 2011
    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).
  3. optimized twig_escape_filter

    arnaud-lb committed Nov 27, 2011
    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).
Commits on Nov 25, 2011
  1. fixed a crash under certain versions of PHP when an object with a __t…

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

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

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

    fabpot committed Nov 23, 2011
    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.
  4. fix ZTS build

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

    arnaud-lb committed Nov 23, 2011
    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
  6. Convert item argument to string

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

    fabpot committed Nov 23, 2011
  8. updated Twig ext version

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

    fabpot committed Nov 23, 2011
    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
  10. merged branch derickr/master (PR #526)

    fabpot committed Nov 23, 2011
    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 ?
  11. merged branch Tobion/patch-1 (PR #529)

    fabpot committed Nov 23, 2011
    Commits
    -------
    
    4802f69 fixing and improving PHPDoc in Template.php
    
    Discussion
    ----------
    
    fixing and improving PHPDoc in Template.php
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
  4. added more unit tests

    fabpot committed Nov 21, 2011
  5. merged branch pierrejoye/master (PR #527)

    fabpot committed Nov 21, 2011
    Commits
    -------
    
    115edf2 - fix property access when the instance implements Iterator or similar cases, by using get_object_vars instead, thx Arnaud Leblanc for the hint.
    
    Discussion
    ----------
    
    Fix props detection for instances implementing Iterator or similar cases
    
    Fix property access when the instance implements Iterator or similar cases, by using get_object_vars instead, thx Arnaud Leblanc for the hint.
  6. - fix property access when the instance implements Iterator or simila…

    pierrejoye committed Nov 21, 2011
    …r cases, by using get_object_vars instead, thx Arnaud Leblanc for the hint.
  7. Merge branch 'master' of github.com:derickr/twig-ext

    derickr committed Nov 21, 2011
    Conflicts:
    	ext/twig/twig.c
  8. Make the extension ZTS-proof.

    derickr committed Nov 21, 2011
  9. removed usage of Reflection in Twig_Template::getAttribute() (thanks …

    fabpot committed Nov 21, 2011
    …Pierre Joye for the property tip)
  10. Fixed name in license.

    derickr authored and fabpot committed Nov 21, 2011
  11. fixed typo

    fabpot committed Nov 21, 2011
  12. Fixed name in license.

    derickr committed Nov 21, 2011