konrad/twig.git
11 years agofixed previous merge
Fabien Potencier [Tue, 16 Oct 2012 12:38:15 +0000]
fixed previous merge

11 years agomerged branch innsand/split-filter_fix (PR #811)
Fabien Potencier [Tue, 16 Oct 2012 12:33:18 +0000]
merged branch innsand/split-filter_fix (PR #811)

This PR was merged into the master branch.

Commits
-------

d5df200 * bug fixes. * str_split on empty delimeter. * tests and documentation updated.
e3c201a Added "split" filter aka explode.

Discussion
----------

Split filter fix

Modification of request #621:
str_split, bug fixes

---------------------------------------------------------------------------

by senz at 2012-08-21T05:56:51Z

@fabpot this is squashed and fixed (hopefully) #621

11 years agofixed import doc
Fabien Potencier [Tue, 16 Oct 2012 05:57:52 +0000]
fixed import doc

11 years agobumped version to 1.10.3-DEV
Fabien Potencier [Mon, 15 Oct 2012 08:26:17 +0000]
bumped version to 1.10.3-DEV

11 years agoprepared the 1.10.2 release
Fabien Potencier [Mon, 15 Oct 2012 08:23:34 +0000]
prepared the 1.10.2 release

11 years agofixed macro calls on PHP 5.4
Fabien Potencier [Mon, 15 Oct 2012 08:22:12 +0000]
fixed macro calls on PHP 5.4

11 years agobumped version to 1.10.2-DEV
Fabien Potencier [Mon, 15 Oct 2012 07:38:17 +0000]
bumped version to 1.10.2-DEV

11 years agoprepared the 1.10.1 release
Fabien Potencier [Mon, 15 Oct 2012 07:35:01 +0000]
prepared the 1.10.1 release

11 years agoupdated macro documentation to warn about a hack that won't work anymore in Twig 2.x
Fabien Potencier [Mon, 15 Oct 2012 07:15:27 +0000]
updated macro documentation to warn about a hack that won't work anymore in Twig 2.x

11 years agomerged branch Adel-E/update-api-docs (PR #858)
Fabien Potencier [Sat, 13 Oct 2012 19:01:24 +0000]
merged branch Adel-E/update-api-docs (PR #858)

This PR was merged into the master branch.

Commits
-------

bee4cd1 Update doc to correspond to the following: http://twig.sensiolabs.org/documentation http://twig.sensiolabs.org/doc/filters/escape.html

Discussion
----------

Update api docs

Update doc to correspond to the following:
http://twig.sensiolabs.org/documentation
http://twig.sensiolabs.org/doc/filters/escape.html

11 years agoUpdate doc to correspond to the following:
eadel [Wed, 10 Oct 2012 23:22:09 +0000]
Update doc to correspond to the following:
http://twig.sensiolabs.org/documentation
http://twig.sensiolabs.org/doc/filters/escape.html

11 years agofixed tests where macros were not used properly
Fabien Potencier [Fri, 12 Oct 2012 14:42:58 +0000]
fixed tests where macros were not used properly

11 years agorefactored previous commit to avoid collission between symbols of different types
Fabien Potencier [Fri, 12 Oct 2012 14:47:13 +0000]
refactored previous commit to avoid collission between symbols of different types

11 years agooptimized macros when imported via the "import" tag
Fabien Potencier [Fri, 12 Oct 2012 13:21:26 +0000]
optimized macros when imported via the "import" tag

This commit unifies the way macros are called independently of how they
were included (via the from or import tag -- see e81c932).

11 years agomerged branch pierrejoye/master (PR #855)
Fabien Potencier [Mon, 8 Oct 2012 13:20:00 +0000]
merged branch pierrejoye/master (PR #855)

This PR was merged into the master branch.

Commits
-------

d398e55 - drop tsrm fetch, not necessary as it is passed as argument already

Discussion
----------

drop unnecessary tsrmls_fetch

11 years ago- drop tsrm fetch, not necessary as it is passed as argument already
Pierre Joye [Mon, 8 Oct 2012 13:15:38 +0000]
- drop tsrm fetch, not necessary as it is passed as argument already

11 years agorefactored some unit tests
Fabien Potencier [Sat, 6 Oct 2012 07:21:32 +0000]
refactored some unit tests

11 years agoupdated CHANGELOG
Fabien Potencier [Fri, 5 Oct 2012 15:09:05 +0000]
updated CHANGELOG

11 years agofixed unit tests when XDebug is enabled
Fabien Potencier [Fri, 5 Oct 2012 15:04:55 +0000]
fixed unit tests when XDebug is enabled

11 years agomerged branch weltling/master (PR #854)
Fabien Potencier [Thu, 4 Oct 2012 17:41:45 +0000]
merged branch weltling/master (PR #854)

This PR was merged into the master branch.

Commits
-------

b013ede fix windows build

Discussion
----------

Trivial fix for windows build

11 years agofix windows build
Anatoliy Belsky [Thu, 4 Oct 2012 16:50:52 +0000]
fix windows build

11 years agomerged branch greg0ire/patch-1 (PR #851)
Fabien Potencier [Sat, 29 Sep 2012 16:33:35 +0000]
merged branch greg0ire/patch-1 (PR #851)

This PR was merged into the master branch.

Commits
-------

d52e15b remove tautology

Discussion
----------

remove tautology

We already know the example is "for example".

11 years agofixed blanks in the doc
Fabien Potencier [Sat, 29 Sep 2012 16:04:58 +0000]
fixed blanks in the doc

11 years agoremove tautology
Grégoire Paris [Sat, 29 Sep 2012 16:02:16 +0000]
remove tautology

11 years agofixed a doc anchor
Fabien Potencier [Sat, 29 Sep 2012 16:01:41 +0000]
fixed a doc anchor

11 years agoupdated CHANGELOG
Fabien Potencier [Fri, 28 Sep 2012 21:55:47 +0000]
updated CHANGELOG

11 years agofixed CS
Fabien Potencier [Fri, 28 Sep 2012 21:50:11 +0000]
fixed CS

11 years agomerged branch char101/master (PR #844)
Fabien Potencier [Fri, 28 Sep 2012 21:45:13 +0000]
merged branch char101/master (PR #844)

This PR was merged into the master branch.

Commits
-------

c23ef25 Add assertEquals to NativeExtensionTest.php
9126dc6 Twig extension: fix case when accessing property of an array casted into object
34cf8e1 Fix double free
4980903 Enhancements for twig extension
db3cb80 Fix NativeExtensionTest
3485ee7 Native extension: handle dynamic properties defined in the get_properties handler in a per instance fashion.

Discussion
----------

Native extension: call get_properties in per instance manner instead of caching it.

Since dynamic properties of an object can be defined by its get_properties handler, we need to call it for each instance.

---------------------------------------------------------------------------

by char101 at 2012-09-21T10:30:37Z

PHPUnit test result

```
PHPUnit 3.7.1 by Sebastian Bergmann.

.S...........................................................   61 / 1253 (  4%)
.............................................................  122 / 1253 (  9%)
.............................................................  183 / 1253 ( 14%)
.............................................................  244 / 1253 ( 19%)
.............................................................  305 / 1253 ( 24%)
.............................................................  366 / 1253 ( 29%)
.............................................................  427 / 1253 ( 34%)
.............................................................  488 / 1253 ( 38%)
.............................................................  549 / 1253 ( 43%)
.............................................................  610 / 1253 ( 48%)
.............................................................  671 / 1253 ( 53%)
.............................................................  732 / 1253 ( 58%)
.............................................................  793 / 1253 ( 63%)
.............................................................  854 / 1253 ( 68%)
.............................................................  915 / 1253 ( 73%)
.............................................................  976 / 1253 ( 77%)
............................................................. 1037 / 1253 ( 82%)
............................................................. 1098 / 1253 ( 87%)
............................................................. 1159 / 1253 ( 92%)
............................................................. 1220 / 1253 ( 97%)
.................................

Time: 4 seconds, Memory: 13.25Mb

OK, but incomplete or skipped tests!
Tests: 1253, Assertions: 2969, Skipped: 1.
```

---------------------------------------------------------------------------

by stof at 2012-09-21T11:58:51Z

@char101 My previous comment about the way the test should be implemented is still valid. Please rewrite it to use the same way to all other integration tests in Twig

---------------------------------------------------------------------------

by char101 at 2012-09-23T04:51:36Z

@stof I don't see the reason of using a fixture. The test case works, it accomplishes its goal. It's simple. It doesn't test for a feature, it tests for a specific case where PHP crashes.

---------------------------------------------------------------------------

by stof at 2012-09-23T13:53:41Z

@char101 I see one: you are building a Twig instance and rendering a template here, which is exactely what the integration tests are doing.
Btw, your test would fail when running phpunit in strict mode as it does not assert anything

---------------------------------------------------------------------------

by char101 at 2012-09-24T02:05:58Z

@stof I don't have the desire to change what isn't broken, but you are free to change it as you see fit. As for the assert, I have added it to the test.

11 years agobumped version to 1.10.1-DEV
Fabien Potencier [Fri, 28 Sep 2012 20:16:13 +0000]
bumped version to 1.10.1-DEV

11 years agoprepared the 1.10.0 release
Fabien Potencier [Fri, 28 Sep 2012 20:11:39 +0000]
prepared the 1.10.0 release

11 years agomerged branch hason/php52 (PR #849)
Fabien Potencier [Wed, 26 Sep 2012 13:56:31 +0000]
merged branch hason/php52 (PR #849)

Commits
-------

adb5d4f Fixed PHP 5.2 incompatibilty

Discussion
----------

Fixed PHP 5.2 incompatibilty

11 years agoFixed PHP 5.2 incompatibilty
Martin Hasoň [Wed, 26 Sep 2012 13:12:41 +0000]
Fixed PHP 5.2 incompatibilty

11 years agoAdd assertEquals to NativeExtensionTest.php
Charles [Mon, 24 Sep 2012 02:04:21 +0000]
Add assertEquals to NativeExtensionTest.php

12 years agoTwig extension: fix case when accessing property of an array casted into object
Charles [Fri, 21 Sep 2012 10:29:41 +0000]
Twig extension: fix case when accessing property of an array casted into object

12 years agoFix double free
Charles [Fri, 21 Sep 2012 09:42:13 +0000]
Fix double free

12 years agoEnhancements for twig extension
Charles [Fri, 21 Sep 2012 07:47:45 +0000]
Enhancements for twig extension

- Fix extension memory leak
- Fix gcc compile warning (cast to const char *)
- Add TWIG_HAS_DYNAMIC_PROPERTY
- Remove the previous translation of 'array_key_exists($item, $object)'
  into TWIG_ARRAY_KEY_EXISTS when checking object property because what
  it really means is property_exists which has already been handled by
  TWIG_HAS_PROPERTY and TWIG_HAS_DYNAMIC_PROPERTY
- Fix native extension spacing

12 years agoFix NativeExtensionTest
Charles [Thu, 20 Sep 2012 11:35:44 +0000]
Fix NativeExtensionTest

12 years agoNative extension: handle dynamic properties defined in the get_properties handler...
Charles [Thu, 20 Sep 2012 11:29:21 +0000]
Native extension: handle dynamic properties defined in the get_properties handler in a per instance fashion.

12 years agoupdated CHANGELOG
Fabien Potencier [Tue, 18 Sep 2012 09:38:15 +0000]
updated CHANGELOG

12 years agotweaked docs
Fabien Potencier [Tue, 18 Sep 2012 09:37:33 +0000]
tweaked docs

12 years agomerged branch drak/reusable_fixtures (PR #805)
Fabien Potencier [Tue, 18 Sep 2012 09:34:35 +0000]
merged branch drak/reusable_fixtures (PR #805)

Commits
-------

36372c6 Made node tests reusable

Discussion
----------

Reusable tests and fixtures

This PR makes Twig integration testing reusable for 3rd party extensions.

I have implemented resuable functional tests.

The [test runner](https://github.com/zikula/core/blob/master/src/Zikula/Bundle/CoreBundle/Tests/Twig/IntegrationTest.php) and the [fixtures](https://github.com/zikula/core/tree/master/src/Zikula/Bundle/CoreBundle/Tests/Twig/Fixtures) are the only part that an extension needs to implement itself.

I've included documentation in the PR.

---------------------------------------------------------------------------

by jusuff at 2012-08-11T20:41:55Z

This PR would make things little easier. Right now tests are organized in confusing way and are hard to implement for Twig extensions

---------------------------------------------------------------------------

by drak at 2012-08-14T09:09:45Z

@fabpot - This is ready for merging now. When it's merged I'll update the documentation as this PR significantly eases our ability to test extensions.

---------------------------------------------------------------------------

by fabpot at 2012-09-16T14:28:16Z

@drak Do you plan to update this PR with the code you have in Zikula?

---------------------------------------------------------------------------

by drak at 2012-09-16T14:37:30Z

@fabpot - Yes, I just need a couple of days (or less).

---------------------------------------------------------------------------

by drak at 2012-09-17T12:00:34Z

@fabpot - I have ported over the code.

---------------------------------------------------------------------------

by drak at 2012-09-18T08:23:18Z

@fabpot - I updated Zikula to us this particular branch so there is a practical test. I've updated the links in the top description part of this PR with the relevant links. The PR also refactors Twig's core tests to use the re-usable test base classes.

---------------------------------------------------------------------------

by fabpot at 2012-09-18T09:01:10Z

@drak Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by drak at 2012-09-18T09:14:08Z

@fabpot - I've squashed them now. Thanks!

12 years agoMade node tests reusable
Drak [Mon, 17 Sep 2012 11:33:27 +0000]
Made node tests reusable

12 years agomerged branch hason/loader (PR #838)
Fabien Potencier [Tue, 18 Sep 2012 05:04:46 +0000]
merged branch hason/loader (PR #838)

Commits
-------

c503287 Fixed typo in Filesystem loader

Discussion
----------

Fixed typo in Filesystem loader

12 years agoFixed typo in Filesystem loader
Martin Hasoň [Mon, 17 Sep 2012 12:11:40 +0000]
Fixed typo in Filesystem loader

12 years agoadded missing information in the doc
Fabien Potencier [Sun, 16 Sep 2012 14:38:44 +0000]
added missing information in the doc

12 years agomerged branch fabpot/named-paths (PR #772)
Fabien Potencier [Sun, 16 Sep 2012 14:34:28 +0000]
merged branch fabpot/named-paths (PR #772)

Commits
-------

7e5acd1 fixed some possible warnings
f0d0d6d fixed typo
b7076fe added Twig_Loader_Filesystem::getNamespaces()
8f7ccd1 moved an exception
9426072 tweaked documentation
b9afa84 renamed the default filesystem namespace to __main__
c34541d changed notation of namespaced templates to @namespace/template_path
0eb4d01 added namespaced templates support in Twig_Loader_Filesystem
c24ea1b added Twig_Loader_Filesystem::prependPath()

Discussion
----------

added namespaced templates support in Twig_Loader_Filesystem

Everything is explained in the updated documentation.

Basically, it gives more flexibility when it comes to manage many templates that are not necessarily related (think frontent vs backend for instance, or templates from different Symfony bundles, ...). It is useful if, for each namespace, you need to look for templates in different directories. This implementation would probably be enough to replace the current Symfony bundle template paths, with more flexibility and less restrictions.

Feedback is more than welcome. One thing I'm not sure about is the `#` separator between the namespace and the template path. Is it the best choice? We need a character that is not used in filesystem paths, so good candidates are: `@`, `!`, `%`, `$`, `*`, `;`, `?`.

Some immediate benefits: give the same template flexibility that we have in Symfony to other frameworks using Twig like Silex. Another benefit would be the ability to share template between Symfony and other frameworks like Twig (more on a proof of concept later).

---------------------------------------------------------------------------

by alessandro1997 at 2012-07-14T16:25:42Z

This is very nice, and I think # is a great choice for the separator character. We could also use @.

---------------------------------------------------------------------------

by jjbohn at 2012-07-14T16:25:59Z

:+1: for #

---------------------------------------------------------------------------

by Symfomany at 2012-07-14T16:27:45Z

Pipe character isn't candidate?

---------------------------------------------------------------------------

by inspiran at 2012-07-14T16:32:52Z

I remember from the wetter.com talk at sf live that they actually implemented a similar functionality: allow twig templates to be defined different from the default path.   So they had something like:

{% extends "cms://Home/weather/..."  ... %}
If we could make the "cms" part a configurable setting then one could use it to point to a custom folder or even to a content provider (symfony cmf?)

Maybe that would be another approach?

---------------------------------------------------------------------------

by fabpot at 2012-07-14T16:33:21Z

The other syntax possibility is something more like we have in Symfony: `@namespace/template_path`.

---------------------------------------------------------------------------

by fabpot at 2012-07-14T16:34:37Z

@inspiran: that's another possibility: use the PHP stream notation.

---------------------------------------------------------------------------

by mvrhov at 2012-07-14T16:36:18Z

I'd also prefer uri/php streams syntax...

---------------------------------------------------------------------------

by Tobion at 2012-07-14T16:41:16Z

On Windows I can create a file with `#` in it. How does it distinguish that? I don't think we will find a single seperation character that works on all file systems, do we? And `@` (e.g. namespace@file) would be semantically strange (unless you read it from right-to-left).
So I'd also prefer uri/php stream syntax.

---------------------------------------------------------------------------

by Symfomany at 2012-07-14T16:43:17Z

@fabpot  Pointer Syntax? or greater than character?

---------------------------------------------------------------------------

by markstory at 2012-07-14T16:43:48Z

I'm in favour of the `foo://` style syntax.  It is similar to other parts of PHP, and avoids overlap with filesystem characters, and doesn't introduce new unique syntax.

---------------------------------------------------------------------------

by stof at 2012-07-14T16:44:25Z

@fabpot ``@namespace/template_path`` would make it confusing in Symfony. Because locating a resource with the kernel would use ``@AcmeDemoBundle/Resources/views/layout.html.twig`` whereas Twig would find the same file as ```@AcmeDemoBundle/layout.html.twig``.

And none of ``#``, ``@``, ``!``, ``%``, ``$`` or ``;`` is forbidden in filenames on Windows.

So I think the URI/stream notation is fine

---------------------------------------------------------------------------

by maryo at 2012-07-14T16:46:44Z

On Windows @!%$; are valid. Invalid characters are \/:*?"<>|

---------------------------------------------------------------------------

by maryo at 2012-07-14T16:47:55Z

Is > allowed on Linux?

---------------------------------------------------------------------------

by jschreuder at 2012-07-14T16:49:17Z

Some thoughts from a non-Symfony user:

* Not sure about the `#`, on the one hand it is used as the comment character on the other hand I'm also familiar with it as a membership operator (which supports its usage)
* The streams/PHP syntax: I don't really like this, the syntax signifies some type of protocol to be used. Even stretched to the limits of its definition you wouldn't be able to define different namespaces as different protocols (same protocol, different location).
* `@namespace/file/path` - kind of like this one, the `@` signifies that it is followed by a special symbol (being the namespace name) and other than that a normal path.
* Another option we've used in Fuel is the double colon `::` as in `namespace::file/path` (like the `#` it signifies membership, but doesn't have another significance in Twig)

---------------------------------------------------------------------------

by gunnarlium at 2012-07-14T17:10:15Z

Does it matter what symbols are valid in filenames? Won't the separator just be used for exploding the string into namespace and path, and thus never be used to directly access a file?

---------------------------------------------------------------------------

by alessandro1997 at 2012-07-14T17:15:27Z

As @gunnarlium said, what's the problem with filenames?

```php
$path = 'namespace#new#page.html';
$parts = explode('#', $path, 2);
list($namespace, $filename) = $parts;

// "namespace and "new#page.html"
var_dump($namespace, $filename);
```

---------------------------------------------------------------------------

by stof at 2012-07-14T17:16:19Z

@gunnarlium the issue is that if you use this symbols in the filename of your template without namespace, Twig will consider it as a namespaced template for another file name

---------------------------------------------------------------------------

by stof at 2012-07-14T17:16:45Z

@alessandro1997 the issue is that namespaces are optional

---------------------------------------------------------------------------

by alessandro1997 at 2012-07-14T17:17:07Z

@stof Oh, right. I didn't get that :-)

---------------------------------------------------------------------------

by gunnarlium at 2012-07-14T17:20:32Z

@stof Ok, I see. So what we want is a symbol which is not allowed as a filename? Or (suboptimally) just add a requirement that template filenames can't contain certain reserved symbols?

---------------------------------------------------------------------------

by fabpot at 2012-07-14T17:23:37Z

But then, who is using `#` in a filename?

Anyway, I'm going to implement a version based on PHP streams to stick to the PHP way. Using a PHP stream might also allow us to get rid of the array loader.

---------------------------------------------------------------------------

by alessandro1997 at 2012-07-14T17:24:01Z

@gunnarlium But how would we check if the user is using reserved symbols in template names? Twig isn't aware of the available templates' names until the user requests them. And when he/she does it's too late because Twig doesn't know if the separator is used as namespace or if it's part of the filename.

---------------------------------------------------------------------------

by stof at 2012-07-14T17:33:38Z

@fabpot even if no sane guy would probably use ``#`` in a filename, it would mean that Twig assumes that all its userbase is sane :)

---------------------------------------------------------------------------

by lolautruche at 2012-07-14T18:51:53Z

-1 for #
+1 for php stream, though I agree with @jschreuder's arguments against it
+2 for @ syntax like in Symfony. I find it more consistent.

---------------------------------------------------------------------------

by fabpot at 2012-07-14T19:50:31Z

One problem with PHP streams is that it makes using template names quite ugly and verbose:

    {% include 'twig://namespace/index.html' %}

And for non-namespaced templates:

    {% include 'twig:///index.html' %}

for which we can provide a shortcut:

    {% include 'index.html' %}

---------------------------------------------------------------------------

by fabpot at 2012-07-14T19:54:35Z

If we are using `@` like in Symfony, it will be:

    {% include '@namespace/index.html' %}

And for non-namespaced templates:

    {% include 'index.html' %}

And for Symfony users, the notation would be the same as for resources. If we register each bundle path as a namespace, the path would even be exactly the same:

    {% include '@AcmeDemoBundle/Resources/views/layout.html.twig' %}

EDIT: that's not so simple because of the templates stored under `app/`.

---------------------------------------------------------------------------

by mahono at 2012-07-14T19:56:54Z

might not be the best idea, but what about using Backslash as namespace char?

---------------------------------------------------------------------------

by fabpot at 2012-07-14T19:57:50Z

@mahono: I have not dared to propose this alternative ;)

---------------------------------------------------------------------------

by fabpot at 2012-07-14T20:06:17Z

I've just made an additional commit that implements the `@namespace/template_path` notation.

---------------------------------------------------------------------------

by Baachi at 2012-07-14T20:32:41Z

The `@` syntax is the most consistent solution.
But the integration in symfony2 is really hard and a BC break.

The stream syntax is not a good solution.
`twig` might already be already registered as a stream.

I would suggest the `::` syntax.

12 years agofixed some possible warnings
Fabien Potencier [Sun, 16 Sep 2012 14:32:36 +0000]
fixed some possible warnings

12 years agofixed typo
Fabien Potencier [Sun, 16 Sep 2012 13:21:03 +0000]
fixed typo

12 years agomerged branch loalf/patch-1 (PR #835)
Fabien Potencier [Sun, 16 Sep 2012 13:20:46 +0000]
merged branch loalf/patch-1 (PR #835)

Commits
-------

5c805a1 Update doc/intro.rst

Discussion
----------

Update doc/intro.rst

How to load Twig using Composer

12 years agoUpdate doc/intro.rst
Javier Lopez [Sun, 16 Sep 2012 12:08:03 +0000]
Update doc/intro.rst

How to load Twig using Composer

12 years agomerged branch pborreli/patch-1 (PR #834)
Fabien Potencier [Thu, 13 Sep 2012 13:15:32 +0000]
merged branch pborreli/patch-1 (PR #834)

Commits
-------

2c1be8f Fixed typo

Discussion
----------

Fixed typo

http://english.stackexchange.com/questions/3640/is-substract-versus-subtract-a-proper-word

12 years agoFixed typo
Pascal Borreli [Wed, 12 Sep 2012 08:29:08 +0000]
Fixed typo

http://english.stackexchange.com/questions/3640/is-substract-versus-subtract-a-proper-word

12 years agoadded a small clarification in the doc
Fabien Potencier [Fri, 7 Sep 2012 13:42:22 +0000]
added a small clarification in the doc

12 years agoadded more information about single-quoted vs double-quoted strings
Fabien Potencier [Fri, 31 Aug 2012 07:12:18 +0000]
added more information about single-quoted vs double-quoted strings

12 years agomerged branch franmomu/patch-1 (PR #821)
Fabien Potencier [Thu, 30 Aug 2012 11:00:12 +0000]
merged branch franmomu/patch-1 (PR #821)

Commits
-------

93b41c3 [Test] Fix double semicolon

Discussion
----------

[Test] Fix double semicolon

12 years ago[Test] Fix double semicolon
Fran Moreno [Thu, 30 Aug 2012 10:51:43 +0000]
[Test] Fix double semicolon

12 years agomerged branch tkoomzaaskz/master (PR #819)
Fabien Potencier [Wed, 29 Aug 2012 05:44:07 +0000]
merged branch tkoomzaaskz/master (PR #819)

Commits
-------

682b0aa improved twig docs: twig for templates designers, NetBeans PHP IDE supports twig natively from 7.2

Discussion
----------

twig for template designers: NetBeans 7.2 supports twig natively

from NetBeans 7.2 twig support is native and does not have to be installed manually.

http://plugins.netbeans.org/plugin/40565/php-symfony2-framework
quote:
Yes; this extension will be part of NetBeans 7.2, more information here [1].
Tomas
[1] http://blogs.oracle.com/netbeansphp/entry/initial_support_for_symfony2

https://blogs.oracle.com/netbeansphp/entry/initial_support_for_symfony2

I checked it myself - installed NB7.2 and it wonderfully highlights twig.

12 years agoimproved twig docs: twig for templates designers, NetBeans PHP IDE supports twig...
Tomasz Ducin [Tue, 28 Aug 2012 20:41:01 +0000]
improved twig docs: twig for templates designers, NetBeans PHP IDE supports twig natively from 7.2

12 years agomade a better test
Fabien Potencier [Tue, 28 Aug 2012 15:05:50 +0000]
made a better test

12 years agofixed an error when a token parser pass a closure as a test to the subparse() method...
Fabien Potencier [Tue, 28 Aug 2012 12:04:14 +0000]
fixed an error when a token parser pass a closure as a test to the subparse() method (closes #818)

12 years agobumped version to 1.9.3-DEV
Fabien Potencier [Sat, 25 Aug 2012 17:36:54 +0000]
bumped version to 1.9.3-DEV

12 years agoprepared the 1.9.2 release
Fabien Potencier [Sat, 25 Aug 2012 17:32:57 +0000]
prepared the 1.9.2 release

12 years agoupdated CHANGELOG
Fabien Potencier [Fri, 24 Aug 2012 13:50:46 +0000]
updated CHANGELOG

12 years agofixed the in operator for objects that contains circular references (closes #813)
Fabien Potencier [Fri, 24 Aug 2012 13:49:46 +0000]
fixed the in operator for objects that contains circular references (closes #813)

12 years agofixed CS
Fabien Potencier [Fri, 24 Aug 2012 12:10:43 +0000]
fixed CS

12 years agomerged branch Banane9/patch-1 (PR #817)
Fabien Potencier [Fri, 24 Aug 2012 12:10:21 +0000]
merged branch Banane9/patch-1 (PR #817)

Commits
-------

ca3b156 Added Highlighter for Notepad++ to the list

Discussion
----------

Added Highlighter for Notepad++ to the list

Ok I edited it :)

12 years agoupdated CHANGELOG
Fabien Potencier [Fri, 24 Aug 2012 12:10:15 +0000]
updated CHANGELOG

12 years agoAdded Highlighter for Notepad++ to the list
Arne Kiesewetter [Fri, 24 Aug 2012 09:41:34 +0000]
Added Highlighter for Notepad++ to the list

12 years agomerged branch arnaud-lb/792 (PR #814)
Fabien Potencier [Thu, 23 Aug 2012 12:18:58 +0000]
merged branch arnaud-lb/792 (PR #814)

Commits
-------

8fa97bb php5.2 fix
d6fc86a [Tests] Test accessing a public property when \ArrayAccess is implemented
6704227 [ext] made ext consistent with 8ec73cf4759f90b961de1732da1732e60c1dbfff
228d2b0 [ext] use only read_property handler

Discussion
----------

Alternative fix for 792

This fixes #792 as described in https://github.com/fabpot/Twig/issues/792#issuecomment-7482480

- 228d2b0 removes the *object-to-array convertion* trick, since the bug comes from there, and it doesn't appear to be needed
- 6704227 is the equivalent of aa6b8358161e4ef35299be06a5ff61bfcba46f6a + 8ec73cf4759f90b961de1732da1732e60c1dbfff (this were not needed before because the bug was hidden by the object to array trick: numeric strings and integers are treated equally in arrays keys)

---------------------------------------------------------------------------

by stof at 2012-08-23T10:19:17Z

@arnaud-lb you need to fix the PHP 5.2 support

12 years agomerged branch arnaud-lb/fix-zts-5.2 (PR #815)
Fabien Potencier [Thu, 23 Aug 2012 12:18:46 +0000]
merged branch arnaud-lb/fix-zts-5.2 (PR #815)

Commits
-------

46ce339 [ext] fixed php 5.2 ZTS builds

Discussion
----------

[ext] Fixed php 5.2 ZTS builds

In 5.2 zend_hash_apply_with_arguments() and its callback argument do not have a TSRMLS.

12 years ago[ext] fixed php 5.2 ZTS builds
Arnaud Le Blanc [Thu, 23 Aug 2012 11:58:44 +0000]
[ext] fixed php 5.2 ZTS builds

zend_hash_apply_with_arguments and its callback argument do not have a
TSRMLS in php 5.2.

12 years agophp5.2 fix
Arnaud Le Blanc [Thu, 23 Aug 2012 11:32:55 +0000]
php5.2 fix

12 years ago[Tests] Test accessing a public property when \ArrayAccess is implemented
Victor Berchet [Mon, 30 Jul 2012 15:02:03 +0000]
[Tests] Test accessing a public property when \ArrayAccess is implemented

Test case for GH-792

12 years ago[ext] made ext consistent with 8ec73cf4759f90b961de1732da1732e60c1dbfff
Arnaud Le Blanc [Mon, 13 Aug 2012 20:28:14 +0000]
[ext] made ext consistent with 8ec73cf4759f90b961de1732da1732e60c1dbfff

12 years ago[ext] use only read_property handler
Arnaud Le Blanc [Mon, 13 Aug 2012 20:25:20 +0000]
[ext] use only read_property handler

12 years ago* bug fixes.
Konstantin G Romanov [Sat, 18 Aug 2012 15:21:44 +0000]
* bug fixes.
* str_split on empty delimeter.
* tests and documentation updated.

12 years agomerged branch arnaud-lb/807 (PR #812)
Fabien Potencier [Mon, 20 Aug 2012 19:10:44 +0000]
merged branch arnaud-lb/807 (PR #812)

Commits
-------

3ca6654 avoid crash when TWIG_GET_ARRAY_ELEMENT returns NULL
3694d4b allow --EXCEPTION-- tests to have a --DATA-- block

Discussion
----------

Fix for #807 (Segmentation fault when exception thrown inside any of ArrayAccess implementation methods)

This fixes #807

12 years agoavoid crash when TWIG_GET_ARRAY_ELEMENT returns NULL
Arnaud Le Blanc [Mon, 20 Aug 2012 18:28:22 +0000]
avoid crash when TWIG_GET_ARRAY_ELEMENT returns NULL

fixes #807

12 years agoallow --EXCEPTION-- tests to have a --DATA-- block
Arnaud Le Blanc [Mon, 20 Aug 2012 18:27:57 +0000]
allow --EXCEPTION-- tests to have a --DATA-- block

12 years agoAdded "split" filter aka explode.
Tyler King [Sat, 4 Feb 2012 20:31:37 +0000]
Added "split" filter aka explode.

12 years agomerged branch garak/patch-1 (PR #809)
Fabien Potencier [Fri, 17 Aug 2012 17:01:21 +0000]
merged branch garak/patch-1 (PR #809)

Commits
-------

fce92f8 Update doc/templates.rst

Discussion
----------

Update doc/templates.rst

Komodo and Komodo Edit have builtin Twig support since last version (7.1)

12 years agoUpdate doc/templates.rst
Massimiliano Arione [Fri, 17 Aug 2012 15:14:24 +0000]
Update doc/templates.rst

Komodo and Komodo Edit have builtin Twig support since last version (7.1)

12 years agomerged branch sdepablos/master (PR #802)
Fabien Potencier [Tue, 7 Aug 2012 08:38:05 +0000]
merged branch sdepablos/master (PR #802)

Commits
-------

b98fff1 Added missing abs and date_modify functions to the filters toctree

Discussion
----------

Added missing abs and date_modify functions to the filters toctree

Both abs.rst and date_modify.rst were createad, but were not linked on the filters toctree

12 years agoAdded missing abs and date_modify functions to the filters toctree
Sergi de Pablos [Tue, 7 Aug 2012 08:31:19 +0000]
Added missing abs and date_modify functions to the filters toctree

12 years agoadded a test to verify that the merge filter actually behaves like said in the docume...
Fabien Potencier [Sat, 28 Jul 2012 08:32:10 +0000]
added a test to verify that the merge filter actually behaves like said in the documentation (closes #789)

12 years agofixed typo
Fabien Potencier [Tue, 17 Jul 2012 08:29:54 +0000]
fixed typo

12 years agoadded Twig_Loader_Filesystem::getNamespaces()
Fabien Potencier [Tue, 17 Jul 2012 06:28:40 +0000]
added Twig_Loader_Filesystem::getNamespaces()

12 years agomoved an exception
Fabien Potencier [Tue, 17 Jul 2012 06:26:32 +0000]
moved an exception

12 years agotweaked documentation
Fabien Potencier [Tue, 17 Jul 2012 06:23:45 +0000]
tweaked documentation

12 years agorenamed the default filesystem namespace to __main__
Fabien Potencier [Tue, 17 Jul 2012 06:23:39 +0000]
renamed the default filesystem namespace to __main__

12 years agochanged notation of namespaced templates to @namespace/template_path
Fabien Potencier [Sat, 14 Jul 2012 20:05:02 +0000]
changed notation of namespaced templates to @namespace/template_path

12 years agoadded namespaced templates support in Twig_Loader_Filesystem
Fabien Potencier [Sat, 14 Jul 2012 13:26:10 +0000]
added namespaced templates support in Twig_Loader_Filesystem

12 years agoadded Twig_Loader_Filesystem::prependPath()
Fabien Potencier [Sat, 14 Jul 2012 14:15:01 +0000]
added Twig_Loader_Filesystem::prependPath()

12 years agobumped version to 1.9.2-DEV
Fabien Potencier [Sun, 22 Jul 2012 10:32:58 +0000]
bumped version to 1.9.2-DEV

12 years agoprepared the 1.9.1 release
Fabien Potencier [Sun, 22 Jul 2012 10:25:41 +0000]
prepared the 1.9.1 release

12 years agoreverted partially a previous commit
Fabien Potencier [Sat, 21 Jul 2012 22:07:57 +0000]
reverted partially a previous commit

This code was not only useful for macros but also when you call a method on
a template instance -- this is not recommended/supported but used by the Symfony profiler)

12 years agooptimized macro calls when auto-escaping is on (closes #779)
Fabien Potencier [Sat, 21 Jul 2012 21:20:56 +0000]
optimized macro calls when auto-escaping is on (closes #779)

12 years agomoved some macro related logic to the generated code
Fabien Potencier [Sat, 21 Jul 2012 20:47:06 +0000]
moved some macro related logic to the generated code

12 years agomerged branch acasademont/patch-1 (PR #781)
Fabien Potencier [Fri, 20 Jul 2012 12:41:38 +0000]
merged branch acasademont/patch-1 (PR #781)

Commits
-------

ee87848 Little typo
c31dd7b The empty test now also checks for empty arrays

Discussion
----------

The empty test now also checks for empty arrays

Little change in the docs to reflect that, as i had to check the source code to see if it worked

12 years agoLittle typo
Albert Casademont [Thu, 19 Jul 2012 11:03:26 +0000]
Little typo