Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Dec 7, 2011
  1. @fabpot

    prepared the 1.4.0 release

    fabpot authored
Commits on Dec 6, 2011
  1. @fabpot
  2. @fabpot

    merged branch duo-criativa/master (PR #544)

    fabpot authored
    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
Commits on Dec 3, 2011
  1. @fabpot
  2. @fabpot
Commits on Dec 2, 2011
  1. @fabpot

    merged branch hason/arrayloader (PR #542)

    fabpot authored
    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.
Commits on Dec 1, 2011
  1. @ribeiropaulor
  2. @ribeiropaulor
  3. @ribeiropaulor
  4. @hason
Commits on Nov 29, 2011
  1. @fabpot

    fixed markup in doc

    fabpot authored
Commits on Nov 27, 2011
  1. @fabpot

    prepared the 1.4.0-RC2 release

    fabpot authored
  2. @fabpot

    merged branch arnaud-lb/twig-escape-filter-opt (PR #537)

    fabpot authored
    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. @arnaud-lb

    optimized twig_escape_filter

    arnaud-lb authored
    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).
  4. @fabpot
Commits on Nov 25, 2011
  1. @fabpot

    fixed a crash under certain versions of PHP when an object with a __t…

    fabpot authored
    …oString() method is used with htmlspecialchars
Commits on Nov 23, 2011
  1. @fabpot

    renamed an internal class

    fabpot authored
  2. @fabpot

    made a small speed optimization

    fabpot authored
  3. @fabpot

    fixed unit tests due to a difference between the PHP and C versions o…

    fabpot authored
    …f Twig_Template::getAttribute()
  4. @fabpot

    merged branch arnaud-lb/ext (PR #530)

    fabpot authored
    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.
  5. @arnaud-lb

    fix ZTS build

    arnaud-lb authored
  6. @arnaud-lb

    Fix undefined behavior

    arnaud-lb authored
    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
  7. @arnaud-lb

    Convert item argument to string

    arnaud-lb authored
    This fixes a crash in some cases and repeated conversions
  8. @arnaud-lb
  9. @arnaud-lb
  10. @fabpot

    tweaked CHANGELOG

    fabpot authored
  11. @fabpot

    updated Twig ext version

    fabpot authored
  12. @fabpot

    merged branch arjenjb/master (PR #528)

    fabpot authored
    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
  13. @fabpot

    merged branch derickr/master (PR #526)

    fabpot authored
    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 ?
  14. @fabpot

    merged branch Tobion/patch-1 (PR #529)

    fabpot authored
    Commits
    -------
    
    4802f69 fixing and improving PHPDoc in Template.php
    
    Discussion
    ----------
    
    fixing and improving PHPDoc in Template.php
Commits on Nov 22, 2011
  1. @Tobion
Commits on Nov 21, 2011
  1. @arjenjb

    Pass around the TSRM

    arjenjb authored
  2. @arjenjb

    Moved zval declaration

    arjenjb authored
  3. @arjenjb

    Removed globals

    arjenjb authored
  4. @arjenjb
Something went wrong with that request. Please try again.