Skip to content
This repository

Jun 28, 2011

  1. Fabien Potencier

    updated CHANGELOG

    authored
  2. Fabien Potencier

    merged branch markstory/fix-308 (PR #373)

    Commits
    -------
    
    eaa8995 Grammatical fix.
    
    Discussion
    ----------
    
    Grammatical fix.
    
    A small grammatical fix for #308 + PR #372
    authored

Jun 27, 2011

  1. Mark Story

    Grammatical fix.

    markstory authored
  2. Fabien Potencier

    merged branch markstory/fix-308 (PR #372)

    Commits
    -------
    
    c178c28 Making docs more explict as to what kind of object can be used with Twig_Function_Method. Fixes #308
    
    Discussion
    ----------
    
    Fix for #308
    
    Making docs more explict as to what kind of object can be used with Twig_Function_Method.
    Fixes #308
    authored

Jun 26, 2011

  1. Mark Story

    Making docs more explict as to what kind of object can be

    used with Twig_Function_Method.
    Fixes #308
    markstory authored

Jun 24, 2011

  1. Fabien Potencier

    fixed json_encode filter (thanks to Koc for the fix)

    authored
  2. Fabien Potencier

    prepare 1.1 RC3

    authored
  3. Fabien Potencier

    fixed method case-sensitivity when using the sandbox mode

    authored
  4. Fabien Potencier

    updated CHANGELOG

    authored
  5. Fabien Potencier

    added doc and fixed CS for previous merge

    authored
  6. Fabien Potencier

    merged branch jturmel/patch-1 (PR #367)

    Commits
    -------
    
    6593761 Allow setting of timezone on twig_date_format_filter method
    
    Discussion
    ----------
    
    Allow setting of timezone on twig_date_format_filter method
    authored
  7. Fabien Potencier

    added Sublime Text support in the doc

    authored
  8. Fabien Potencier

    reworded the section on IDEs and added an Eclipse plugin

    authored

Jun 22, 2011

  1. Josh Turmel

    Allow setting of timezone on twig_date_format_filter method

    jturmel authored

Jun 17, 2011

  1. Fabien Potencier

    fixed possible security problems with NUL bytes

    authored
  2. Fabien Potencier

    releasing 1.1.0 RC2

    authored

Jun 16, 2011

  1. Fabien Potencier

    added Twig_Error::getRawMessage()

    authored
  2. Fabien Potencier

    added an exception when the template passed to "use" is not a string

    authored
  3. Fabien Potencier

    merged branch henrikbjorn/issue-347 (PR #348)

    Commits
    -------
    
    a8d29b1 Add testcase for issue #347
    
    Discussion
    ----------
    
    Add testcase for issue #347
    
    Dismisses false issue.
    authored
  4. Fabien Potencier

    updated CHANGELOG

    authored
  5. Fabien Potencier

    merged branch nikic/nestedDefinedTestWithStrictVars (PR #359)

    Commits
    -------
    
    f2a1c2b Refactor and add additional default filter tests
    e760483 Make `a.b is defined` not throw an exception if a is not defined (in strict mode)
    
    Discussion
    ----------
    
    Make `a.b is defined` not throw an exception if a is not defined (in strict mode)
    
    This commit does two things: Firstly (that's the main part) it makes `a.b is defined` not throw an error in strict mode if `a` is undefined (applies for `a.b.c` aso too) [fixes #337]. Additionally it allows `a.b|default` just like it is allowed to do `a|default`.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/06/09 22:21:11 -0700
    
    This is quite a big change. Can you add some tests?
    
    ---------------------------------------------------------------------------
    
    by nikic at 2011/06/10 08:19:49 -0700
    
    I added some more tests for the default filter in the fixtures. But I wasn't sure how I should test the default test's behavior in strict mode. If you could point me in the right direction here I would add those tests, too ;)
    authored
  6. Fabien Potencier

    updated CHANGELOG

    authored
  7. Fabien Potencier

    merged branch arnaud-lb/line-numbers (PR #353)

    Commits
    -------
    
    5ec1955 added {% line \d+ %} directive
    
    Discussion
    ----------
    
    added {% line \d+ %} directive
    
    This directive allows to change the current line number in the tokenizer.
    
    This allows to generate Twig code from some other Twig or partially-Twig script, and still get relevant line numbers in error messages, when the line numbers of the generated Twig script do not match those of the original script.
    
    For example in the following script:
    
        foo
        {% line 10 %}
        bar
        {{ baz }}
    
    `"foo"` is on line 1, `"bar"` is considered to be on line 10 and `{{ baz }}` is considered to be on line 11.
    
    This is similar to `# line ...` directives in C.
    
    ---------------------------------------------------------------------------
    
    by nikic at 2011/06/05 08:51:20 -0700
    
    I don't quite yet understand it's use cases.
    
    ---------------------------------------------------------------------------
    
    by arnaud-lb at 2011/06/05 09:17:57 -0700
    
    The `{% line ... %}` directive is not meant to be used by humans, but rather by generators.
    
    The use case is the same as [#line directives in C](http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html): when you generate a C file from a template, you would prefer that the compiler refers to the line number of the template, instead of the line number of the generated file.
    
    In my case, I built a [HAML compiler for php](https://github.com/arnaud-lb/MtHaml) which can target Twig as an output language. I use it as a Twig pre-processor so that it translates HAML scripts to Twig scripts on the fly in a custom Twig_Loader.
    
    So I have scripts like that:
    
        %p
          test
        %div = foo.bar
    
    which is compiled like that:
    
        <p>
          test
        </p>
        <div>
           {{ foo.bar }}
        </div>
    
    If an error occurs in the execution of {{ foo.bar }}, Twig will throw an error refering to line 5 in the original script, which is wrong. A simple solution to this is the {% line %} directive:
    
        <p>
          test
        </p>
        <div>
        {% line 3 %}
           {{ foo.bar }}
        </div>
    
    Now if an error occures in {{ foo.bar }}, the error will refer to line 3.
    
    ---------------------------------------------------------------------------
    
    by nikic at 2011/06/05 09:33:26 -0700
    
    Ah, okay, seems reasonable. Though I'm not sure whether it is appropriate to use the comment syntax to accomplish that.
    
    ---------------------------------------------------------------------------
    
    by arnaud-lb at 2011/06/05 10:41:03 -0700
    
    You are right, I changed the request to use the block syntax instead.
    authored

Jun 14, 2011

  1. Fabien Potencier

    added null as an alias for the none test

    authored

Jun 10, 2011

  1. Refactor and add additional default filter tests

    nikic authored

Jun 09, 2011

  1. Make `a.b is defined` not throw an exception if a is not defined (in …

    …strict mode)
    nikic authored

Jun 07, 2011

  1. Fabien Potencier

    added Twig_Loader_Filesystem::addPath()

    authored

Jun 05, 2011

  1. Arnaud Le Blanc

    added {% line \d+ %} directive

    arnaud-lb authored
  2. Fabien Potencier

    added missing debug info when using traits

    authored
  3. Fabien Potencier

    fixed Twig_Error when the exception is thrown from within the generat…

    …ed template
    authored

Jun 01, 2011

  1. Henrik Bjørnskov

    Add testcase for issue #347

    henrikbjorn authored

May 28, 2011

  1. Fabien Potencier

    updated VERSION

    authored
  2. Fabien Potencier

    releasing 1.1.0 RC1

    authored
  3. Fabien Potencier

    updated CHANGELOG

    authored
  4. Fabien Potencier

    Merge remote branch 'tna/default-filter'

    * tna/default-filter:
      Moved default filter fix to its proper place
      Fixes default filter
    authored
Something went wrong with that request. Please try again.