web/konrad/twig.git
9 years agoFixed usage of LimitIterator
Andrey Grachov [Fri, 10 Oct 2014 20:28:30 +0000]
Fixed usage of LimitIterator

9 years agobumped version to 1.16.2-DEV
Fabien Potencier [Fri, 10 Oct 2014 18:56:23 +0000]
bumped version to 1.16.2-DEV

9 years agoprepared the 1.16.1 release
Fabien Potencier [Fri, 10 Oct 2014 14:09:53 +0000]
prepared the 1.16.1 release

9 years agoupdated CHANGELOG
Fabien Potencier [Fri, 10 Oct 2014 13:58:27 +0000]
updated CHANGELOG

9 years agobug #1530 Improved error reporting in a sandboxed template (hason)
Fabien Potencier [Fri, 10 Oct 2014 13:57:57 +0000]
bug #1530 Improved error reporting in a sandboxed template (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Improved error reporting in a sandboxed template

Commits
-------

58efc42 Improved error reporting in a sandboxed template

9 years agoupdated CHANGELOG
Fabien Potencier [Fri, 10 Oct 2014 13:47:26 +0000]
updated CHANGELOG

9 years agobug #1528 Fixed guessing a template info for exceptions (hason)
Fabien Potencier [Fri, 10 Oct 2014 13:46:25 +0000]
bug #1528 Fixed guessing a template info for exceptions (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed guessing a template info for exceptions

Commits
-------

42cd697 Fixed guessing a template info for exceptions

9 years agoupdated CHANGELOG
Fabien Potencier [Fri, 10 Oct 2014 13:40:19 +0000]
updated CHANGELOG

9 years agobug #1527 Fixed resetting debug info in compiler (hason)
Fabien Potencier [Fri, 10 Oct 2014 13:38:59 +0000]
bug #1527 Fixed resetting debug info in compiler (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed resetting debug info in compiler

Commits
-------

0e7cec5 Fixed resetting debug info in compiler

9 years agoImproved error reporting in a sandboxed template
Martin Hasoň [Fri, 10 Oct 2014 13:36:50 +0000]
Improved error reporting in a sandboxed template

9 years agoFixed guessing a template info for exceptions
Martin Hasoň [Fri, 10 Oct 2014 07:58:46 +0000]
Fixed guessing a template info for exceptions

9 years agoFixed resetting debug info in compiler
Martin Hasoň [Fri, 10 Oct 2014 10:23:53 +0000]
Fixed resetting debug info in compiler

9 years agoupdated CHANGELOG
Fabien Potencier [Wed, 1 Oct 2014 17:51:59 +0000]
updated CHANGELOG

9 years agobug #1470 Fixed "in" operator (hason)
Fabien Potencier [Wed, 1 Oct 2014 17:50:35 +0000]
bug #1470 Fixed "in" operator (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed "in" operator

Commits
-------

9b6497f Fixed "in" operator

9 years agoudpated CHANGELOG
Fabien Potencier [Wed, 1 Oct 2014 17:13:04 +0000]
udpated CHANGELOG

9 years agofeature #1503 Use LimitIterator on Iterable objects within the slice filter (Anthony...
Fabien Potencier [Wed, 1 Oct 2014 17:09:15 +0000]
feature #1503 Use LimitIterator on Iterable objects within the slice filter (Anthony Sterling)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Use LimitIterator on Iterable objects within the slice filter

Previously the `slice` filter would create an array of items if the subject to be sliced implemented Traversable, this PR instead passes the subject to LimitIterator first - but only if `$start` and `$length` are positive values as LimitIterator does not support the "n'th from end" behaviour.

Our use case is that we have an API client, which we pass to slice, that implements Traversable but lazy loads the items to be returned via an API when `Iterator::current()` is called. Here a quick example:-

```
{% for item in client.items | slice(0,5) %}
    {{ item.name }}
{% endfor %}

<img src="/assets/useless-sodding-banner.jpg" />

{% for item in client.items | slice(5,10) %}
    {{ item.name }}
{% endfor %}
```

Current behaviour would mean that the client would issue 15 requests to the API, 5 for the first block, and 10 for the second (but only return items 5 to 10). This PR means only 10 requests are made, 5 in each block.

I'd imagine this would lower memory usage too.

Commits
-------

fdddb1c Use LimitIterator on Iterable objects within the splice filter

9 years agofixed typo
Fabien Potencier [Wed, 1 Oct 2014 11:22:22 +0000]
fixed typo

9 years agodeprecated Node::toXml()
Fabien Potencier [Wed, 1 Oct 2014 11:19:23 +0000]
deprecated Node::toXml()

9 years agominor #1509 Update convert_encoding.rst: wrong argument order (binarious)
Fabien Potencier [Wed, 1 Oct 2014 05:31:33 +0000]
minor #1509 Update convert_encoding.rst: wrong argument order (binarious)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Update convert_encoding.rst: wrong argument order

The arguments are in incorrect order. The first should be `to` and the second should be `from` - just like the text describes it.

Commits
-------

4e1d9a7 Update convert_encoding.rst

9 years agofixed some assertions
Fabien Potencier [Tue, 30 Sep 2014 17:44:16 +0000]
fixed some assertions

9 years agobug #1500 fix inconsistent response from twig_slice (rodnaph)
Fabien Potencier [Tue, 30 Sep 2014 17:40:30 +0000]
bug #1500 fix inconsistent response from twig_slice (rodnaph)

This PR was squashed before being merged into the 1.16-dev branch (closes #1500).

Discussion
----------

fix inconsistent response from twig_slice

twig_slice can return a boolean when slicing a string outside of its bounds and mbstring is not available.  this would cause a knock-on error in twig_first/twig_last when calling current()

this (as suggested) adds a cast to emulate the behaviour of mb_substr for substr.

Commits
-------

c740060 fix inconsistent response from twig_slice

9 years agofix inconsistent response from twig_slice
Rhodri Pugh [Mon, 8 Sep 2014 18:35:00 +0000]
fix inconsistent response from twig_slice

9 years agominor #1520 date() documentation correction (brandonkelly)
Fabien Potencier [Tue, 30 Sep 2014 17:37:32 +0000]
minor #1520 date() documentation correction (brandonkelly)

This PR was merged into the 1.16-dev branch.

Discussion
----------

date() documentation correction

The date() docs were incorrectly stating that the argument should be in a format supported by PHP’s [date()](http://php.net/manual/en/function.date.php) function. That’s true of the |date filter which is used to _format_ dates, but not the date() function, which is used to _create_ new dates.

I double-checked the code and whatever you pass into date() ultimately will get passed to a [DateTime constructor](http://php.net/manual/en/datetime.construct.php), which accepts an actual date string, formatted in one of PHP’s [date and time format](http://php.net/manual/en/datetime.formats.php), which is a different beast than the actual format definition string you might pass into PHP’s date() function.

Commits
-------

2f5a927 date() documentation correction

9 years agodate() documentation correction
Brandon Kelly [Tue, 30 Sep 2014 17:07:37 +0000]
date() documentation correction

9 years agoUpdate convert_encoding.rst
binarious [Mon, 22 Sep 2014 09:29:45 +0000]
Update convert_encoding.rst

The arguments were in incorrect order. The first should be `to` and the second should be `from` - just like the text describes it.

10 years agoUse LimitIterator on Iterable objects within the splice filter
Anthony Sterling [Wed, 10 Sep 2014 14:32:22 +0000]
Use LimitIterator on Iterable objects within the splice filter

10 years agominor #1492 add PHP 5.6 to .travis.yml (sasezaki)
Fabien Potencier [Tue, 2 Sep 2014 14:08:17 +0000]
minor #1492 add PHP 5.6 to .travis.yml (sasezaki)

This PR was merged into the 1.16-dev branch.

Discussion
----------

add PHP 5.6 to .travis.yml

Commits
-------

ed7004b add PHP 5.6 to .travis.yml

10 years agoadd PHP 5.6 to .travis.yml
kazusuke sasezaki [Thu, 28 Aug 2014 15:51:54 +0000]
add PHP 5.6 to .travis.yml

10 years agominor #1474 Update installation.rst (soatok)
Fabien Potencier [Wed, 27 Aug 2014 09:26:36 +0000]
minor #1474 Update installation.rst (soatok)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Update installation.rst

Refer to PGP signature verification in the installation instructions for tarballs.

Commits
-------

3c48cb1 Update installation.rst

10 years agominor #1487 Added note about array_merge php function (pulzarraider)
Fabien Potencier [Wed, 27 Aug 2014 09:25:58 +0000]
minor #1487 Added note about array_merge php function (pulzarraider)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Added note about array_merge php function

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Just a small doc improvement.

Commits
-------

f712b8f Added note about array_merge php function

10 years agominor #1484 Delimit comment in template using correct syntax (johnberberich)
Fabien Potencier [Wed, 27 Aug 2014 09:24:21 +0000]
minor #1484 Delimit comment in template using correct syntax (johnberberich)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Delimit comment in template using correct syntax

Enclose the comment in '{# #}' instead of beginning line with '#'.

Commits
-------

4e1515c Delimit comment in template using correct syntax

10 years agoAdded note about array_merge php function
Andrej Hudec [Sat, 23 Aug 2014 22:31:40 +0000]
Added note about array_merge php function

10 years agoDelimit comment in template using correct syntax
John Berberich [Fri, 22 Aug 2014 14:11:09 +0000]
Delimit comment in template using correct syntax

Enclose the comment in '{# #}' instead of beginning line with '#'.

10 years agominor #1475 Improved exception message while trying to access an attribute from an...
Fabien Potencier [Wed, 6 Aug 2014 06:46:32 +0000]
minor #1475 Improved exception message while trying to access an attribute from an empty array (phansys, tucksaun)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Improved exception message while trying to access an attribute from an empty array

Rebased #1439 in master and updated twig extension

Commits
-------

759a77d [Ext] updating Twig extension for previous commit
15ce450 Improved exception message while trying to access an attribute from an empty array.

10 years ago[Ext] updating Twig extension for previous commit
Tugdual Saunier [Tue, 5 Aug 2014 16:25:10 +0000]
[Ext] updating Twig extension for previous commit

10 years agoImproved exception message while trying to access an attribute from an empty array.
Javier Spagnoletti [Wed, 9 Jul 2014 16:47:07 +0000]
Improved exception message while trying to access an attribute from an empty array.

10 years agoFixed "in" operator
Martin Hasoň [Mon, 4 Aug 2014 05:09:00 +0000]
Fixed "in" operator

10 years agoupdated CHANGELOG
Fabien Potencier [Tue, 5 Aug 2014 12:54:54 +0000]
updated CHANGELOG

10 years agoUpdate installation.rst
Soatok [Tue, 5 Aug 2014 12:33:51 +0000]
Update installation.rst

Refer to PGP signature verification in the installation instructions for tarballs.

10 years agochanged the way we check for HHVM
Fabien Potencier [Mon, 4 Aug 2014 19:55:24 +0000]
changed the way we check for HHVM

10 years agominor #1471 Fixed a test on hhvm (hason)
Fabien Potencier [Mon, 4 Aug 2014 19:54:18 +0000]
minor #1471 Fixed a test on hhvm (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed a test on hhvm

Commits
-------

0c169ce Fixed a test on hhvm

10 years agoFixed a test on hhvm
Martin Hasoň [Mon, 4 Aug 2014 09:47:26 +0000]
Fixed a test on hhvm

10 years agobug #1468 Fixed "starts with" a "ends with" operators for non-string arguments (hason)
Fabien Potencier [Sun, 3 Aug 2014 08:10:53 +0000]
bug #1468 Fixed "starts with" a "ends with" operators for non-string arguments (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed "starts with" a "ends with" operators for non-string arguments

Commits
-------

4c26981 Fixed "starts with" a "ends with" operators for non-string arguments

10 years agoFixed "starts with" a "ends with" operators for non-string arguments
Martin Hasoň [Sat, 2 Aug 2014 15:11:21 +0000]
Fixed "starts with" a "ends with" operators for non-string arguments

10 years agobug #1452 Fixed 'starts with' operator for empty needle (hason)
Fabien Potencier [Fri, 1 Aug 2014 15:28:52 +0000]
bug #1452 Fixed 'starts with' operator for empty needle (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed 'starts with' operator for empty needle

Fixes #1432

Commits
-------

790305a Fixed 'starts with' operator for empty needle

10 years agoFixed 'starts with' operator for empty needle
Martin Hasoň [Fri, 11 Jul 2014 08:37:09 +0000]
Fixed 'starts with' operator for empty needle

10 years agoadded more docs for the if tag
Fabien Potencier [Fri, 1 Aug 2014 07:38:44 +0000]
added more docs for the if tag

10 years agofixed the attribute() function when passing a variable for the arguments
Fabien Potencier [Fri, 1 Aug 2014 07:16:32 +0000]
fixed the attribute() function when passing a variable for the arguments

10 years agominor #1465 Some minor cleanup (JeroenDeDauw)
Fabien Potencier [Thu, 31 Jul 2014 13:21:40 +0000]
minor #1465 Some minor cleanup (JeroenDeDauw)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Some minor cleanup

Commits
-------

e6da6bb Restore unused var
d8e1077 Get rid of naming clash
3e50672 Remove unused local vars
291141f Remove unused var
9921554 Fix type hint
1d2b877 Fix type hint

10 years agominor #1462 Simplified Twig_Node_Include (hason)
Fabien Potencier [Thu, 31 Jul 2014 13:20:45 +0000]
minor #1462 Simplified Twig_Node_Include (hason)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Simplified Twig_Node_Include

Commits
-------

632fe90 Simplified Twig_Node_Include

10 years agominor #1458 Add variables types in error message of twig_array_merge (inalgnu)
Fabien Potencier [Thu, 31 Jul 2014 11:15:54 +0000]
minor #1458 Add variables types in error message of twig_array_merge (inalgnu)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Add variables types in error message of twig_array_merge

Commits
-------

ea6676d add variables types in error message of twig_array_merge

10 years agoRestore unused var
jeroendedauw [Thu, 31 Jul 2014 10:30:50 +0000]
Restore unused var

10 years agoGet rid of naming clash
jeroendedauw [Wed, 30 Jul 2014 20:49:24 +0000]
Get rid of naming clash

Static code analysis tool did not like this.
Looks like it was wrong before. Tests unchanged though.

10 years agoRemove unused local vars
jeroendedauw [Wed, 30 Jul 2014 21:27:25 +0000]
Remove unused local vars

10 years agoRemove unused var
jeroendedauw [Wed, 30 Jul 2014 20:42:59 +0000]
Remove unused var

10 years agoFix type hint
jeroendedauw [Wed, 30 Jul 2014 20:53:20 +0000]
Fix type hint

In PHPStorm the inferred type was 'A'

10 years agoFix type hint
jeroendedauw [Wed, 30 Jul 2014 21:28:53 +0000]
Fix type hint

PHPStorm wrongly inferred the type 'Unicode'

10 years agoSimplified Twig_Node_Include
Martin Hasoň [Wed, 30 Jul 2014 21:27:46 +0000]
Simplified Twig_Node_Include

10 years agoadd variables types in error message of twig_array_merge
Inal DJAFAR [Wed, 30 Jul 2014 15:36:49 +0000]
add variables types in error message of twig_array_merge

10 years agominor #1457 Fixed the `matches` operator code example (brandonkelly)
Fabien Potencier [Tue, 29 Jul 2014 11:54:16 +0000]
minor #1457 Fixed the `matches` operator code example (brandonkelly)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed the `matches` operator code example

A customer just pointed out that your `matches` operator code example wasn't working for them, and it ended up being because its backslashes themselves needed to be escaped by additional backslashes. (I've verified this.)

While I was editing it, I also switched to forwardslash delimiters on the regex, since those are much more commonly used than curly brackets. (I hadn't even been aware that curly brackets are allowed.) To back that assertion up, [PHP's official preg_quote() docs](http://php.net/manual/en/function.preg-quote.php) state:

> The `/` is the most commonly used delimiter.

Commits
-------

33dcbc8 Fixed the `matches` operator code example

10 years agoFixed the `matches` operator code example
Brandon Kelly [Mon, 28 Jul 2014 18:33:46 +0000]
Fixed the `matches` operator code example

It wasn't working because the backslashes themselves needed to be escaped by additional backslashes. Also switched to using forwardslashes for the regex delimiters rather than curly brackets.

10 years agobug #1453 Fix for mb function overload mb_substr acting different (1emming)
Fabien Potencier [Mon, 28 Jul 2014 13:12:00 +0000]
bug #1453 Fix for mb function overload mb_substr acting different (1emming)

This PR was squashed before being merged into the 1.16-dev branch (closes #1453).

Discussion
----------

Fix for mb function overload mb_substr acting different

When bug hunting https://github.com/fabpot/Twig/issues/1428 I ran into an issue.
I started out by changing my `php.ini` for the `cli` enviroment, I've added:
`mbstring.func_overload = 2`
Later I tested with adding and removing:
`mbstring.internal_encoding = 'UTF-8'`

It turns out `mb_substr` returns `false` and not `''` when doing something like this:

```php
$item = '';
$start = -1;
$length = 1;
$charset = 'UTF-8';
$a = mb_substr($item, $start, $length, $charset);
var_dump($a);
die;
```

I'm not sure this will fix 1428 since I don't have enough information for this, but this PR should at least fix one issue.

Commits
-------

214fe52 Fix for mb function overload mb_substr acting different

10 years agoFix for mb function overload mb_substr acting different
1emming [Sun, 27 Jul 2014 15:37:04 +0000]
Fix for mb function overload mb_substr acting different

10 years agofixed some typos
Fabien Potencier [Tue, 8 Jul 2014 13:46:25 +0000]
fixed some typos

10 years agominor #1333 Added disambiguation on using raw in expressions (OwlyCode)
Fabien Potencier [Tue, 8 Jul 2014 13:44:12 +0000]
minor #1333 Added disambiguation on using raw in expressions (OwlyCode)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Added disambiguation on using raw in expressions

I recently got in trouble using the ``raw`` filter in a ternary, leading to a value being escaped and me not expecting it. The code was :

```
{{ foo|striptags|length > 250 ? foo|striptags|slice(0, 250) ~ '...' : foo|raw }}
```

When foo's length was under 250 characters, the result of this expression was escaped. Here is the updated documentation to explain why.

Commits
-------

cec2b57 Added disambiguation on using raw in expressions

10 years agominor #1431 Typo in deprecated.rst (barryvdh)
Fabien Potencier [Tue, 8 Jul 2014 13:42:48 +0000]
minor #1431 Typo in deprecated.rst (barryvdh)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Typo in deprecated.rst

Commits
-------

06ca7f9 Typo in deprecated.rst

10 years agobumped version to 1.16.1-DEV
Fabien Potencier [Mon, 7 Jul 2014 12:54:10 +0000]
bumped version to 1.16.1-DEV

10 years agoTypo in deprecated.rst
Barry vd. Heuvel [Sat, 5 Jul 2014 12:50:30 +0000]
Typo in deprecated.rst

10 years agoprepared the 1.16.0 release
Fabien Potencier [Sat, 5 Jul 2014 12:19:05 +0000]
prepared the 1.16.0 release

10 years agoreplaced deprecated divisibleby by divisible by in tests
Fabien Potencier [Sat, 5 Jul 2014 12:08:19 +0000]
replaced deprecated divisibleby by divisible by in tests

10 years agoreplaced deprecated sameas by same as in tests
Fabien Potencier [Sat, 5 Jul 2014 12:06:29 +0000]
replaced deprecated sameas by same as in tests

10 years agofixed some deprecation notices
Fabien Potencier [Sat, 5 Jul 2014 12:03:33 +0000]
fixed some deprecation notices

10 years agofixed the deprecated docs about PEAR
Fabien Potencier [Sat, 5 Jul 2014 11:37:05 +0000]
fixed the deprecated docs about PEAR

10 years agofixed potential exception
Fabien Potencier [Sat, 5 Jul 2014 11:16:15 +0000]
fixed potential exception

10 years agominor #1426 Add 'PHP-twig for atom' package to IDEs support (zoltanradics)
Fabien Potencier [Sat, 5 Jul 2014 09:31:17 +0000]
minor #1426 Add 'PHP-twig for atom' package to IDEs support (zoltanradics)

This PR was squashed before being merged into the 1.16-dev branch (closes #1426).

Discussion
----------

Add 'PHP-twig for atom' package to IDEs support

Since Atom.io editor is growing, i would add this package to the list for people who would like to edit Twig in Atom.

Commits
-------

c90d469 Add 'PHP-twig for atom' package to IDEs support

10 years agoAdd 'PHP-twig for atom' package to IDEs support
Zoltan Radics [Fri, 27 Jun 2014 22:14:31 +0000]
Add 'PHP-twig for atom' package to IDEs support

10 years agominor #1422 Update slice.rst (1emming)
Fabien Potencier [Fri, 20 Jun 2014 07:26:46 +0000]
minor #1422 Update slice.rst (1emming)

This PR was merged into the 1.16-dev branch.

Discussion
----------

Update slice.rst

Please state that Twig `slice` is  multi-byte safe since it uses `mb_substr` :)

Commits
-------

87165e7 Update slice.rst

10 years agoUpdate slice.rst
Seb Minderhoud [Thu, 19 Jun 2014 07:49:36 +0000]
Update slice.rst

10 years agoadded a note in the docs about the fact that installing the C ext is optional
Fabien Potencier [Mon, 26 May 2014 15:15:28 +0000]
added a note in the docs about the fact that installing the C ext is optional

10 years agofeature #1390 fixed url_encode when raw is false and URL is an array (Tobion, fabpot)
Fabien Potencier [Mon, 26 May 2014 00:34:04 +0000]
feature #1390 fixed url_encode when raw is false and URL is an array (Tobion, fabpot)

This PR was merged into the 1.16-dev branch.

Discussion
----------

fixed url_encode when raw is false and URL is an array

alternative for #1388

Commits
-------

1930600 fixed url_encode when raw is false and URL is an array
49ba6b4 removed parameter from url_encode filter

10 years agofixed url_encode when raw is false and URL is an array
Fabien Potencier [Fri, 25 Apr 2014 11:33:19 +0000]
fixed url_encode when raw is false and URL is an array

10 years agoremoved parameter from url_encode filter
Tobias Schultze [Fri, 22 Feb 2013 13:58:36 +0000]
removed parameter from url_encode filter

the filter now only uses the more appropriate rawurlencode() which is also more consistent with the escape('url') filter

10 years agoupdated CHANGELOG
Fabien Potencier [Mon, 26 May 2014 00:01:07 +0000]
updated CHANGELOG

10 years agobug #1370 Fixed inheritance in a 'use'-hierarchy (hason)
Fabien Potencier [Mon, 26 May 2014 00:00:46 +0000]
bug #1370 Fixed inheritance in a 'use'-hierarchy (hason)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Fixed inheritance in a 'use'-hierarchy

Fixes #1365

Commits
-------

9e0907e Fixed inheritance in a 'use'-hierarchy

10 years agoupdated CHANGELOG
Fabien Potencier [Sun, 25 May 2014 23:57:56 +0000]
updated CHANGELOG

10 years agobug #1382 Added isSandbox check around the __toString check in Sandbox extension...
Fabien Potencier [Sun, 25 May 2014 23:57:06 +0000]
bug #1382 Added isSandbox check around the __toString check in Sandbox extension (Scott Smith, smitherz82)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Added isSandbox check around the __toString check in Sandbox extension

The `__toString` policy check currently still happens when the sandbox is disabled

Commits
-------

3ce4202 Added test for sandbox __toString when not enabled
8dfa432 Added isSandbox check around the __toString check

10 years agominor #1403 Refactor namespace/shortname parsing into own method (anlutro)
Fabien Potencier [Sun, 25 May 2014 23:56:03 +0000]
minor #1403 Refactor namespace/shortname parsing into own method (anlutro)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Refactor namespace/shortname parsing into own method

I've written a custom file loader in order for the namespace syntax to match across different resource loading classes. To achieve this I have to replace the loadTemplate method, which includes a lot of logic. While this logic may not be likely to change anytime soon, I'd feel better if the namespace parsing was extracted into its own method so I can replace just that bit.

Commits
-------

9dd3bb8 Refactor namespace/shortname parsing into own method

10 years agominor #1409 Update json_encode.rst (matthieuprat)
Fabien Potencier [Sun, 25 May 2014 23:53:41 +0000]
minor #1409 Update json_encode.rst (matthieuprat)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Update json_encode.rst

Commits
-------

1b3ac0a Update json_encode.rst

10 years agominor #1413 [Doc]Put the return of the split filter in a variable (n1c01a5)
Fabien Potencier [Sun, 25 May 2014 23:53:14 +0000]
minor #1413 [Doc]Put the return of the split filter in a variable (n1c01a5)

This PR was squashed before being merged into the 1.15-dev branch (closes #1413).

Discussion
----------

[Doc]Put the return of the split filter in a variable

Commits
-------

0e228c7 [Doc]Put the return of the split filter in a variable

10 years ago[Doc]Put the return of the split filter in a variable
Wagner Nicolas [Sat, 24 May 2014 12:53:52 +0000]
[Doc]Put the return of the split filter in a variable

10 years agoUpdate json_encode.rst
Matthieu Prat [Thu, 22 May 2014 18:35:52 +0000]
Update json_encode.rst

10 years agoRefactor namespace/shortname parsing into own method
Andreas Lutro [Fri, 16 May 2014 08:08:10 +0000]
Refactor namespace/shortname parsing into own method

Allows you to more easily create a custom file loader with a custom
namespace syntax.

10 years agominor #1406 Improve the description of the 'same as' test (adamelso)
Fabien Potencier [Wed, 21 May 2014 01:15:25 +0000]
minor #1406 Improve the description of the 'same as' test (adamelso)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Improve the description of the 'same as' test

This description of the `same as` test is based on the description in the docblock for `Twig_Node_Expression_Test_Sameas`. It reads better than the one currently used in the docs.

Commits
-------

e4b7db1 Improve the description of the 'same as' test

10 years agoImprove the description of the 'same as' test
Adam Elsodaney [Tue, 20 May 2014 14:02:48 +0000]
Improve the description of the 'same as' test

This description of the 'same as' test is based on the description in the docblock for Twig_Node_Expression_Test_Sameas. It reads better than the one currently used in the docs.

10 years agominor #1401 [Twig][Tests][Fixtures][filters] Added empty string tests for "first...
Fabien Potencier [Thu, 15 May 2014 19:43:48 +0000]
minor #1401 [Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters (ureimers)

This PR was squashed before being merged into the 1.15-dev branch (closes #1401).

Discussion
----------

[Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT

This was already fixed with with https://github.com/fabpot/Twig/commit/6003ae43b92cfa7e1ddec17262733355e0bf435a but to make sure there won't be any regression bugs in the future. This is an edge case but the first and the last element of an empty string are empty strings too.
Before the above mentioned PR this threw a notice `Uninitialized string offset: 0`.

Commits
-------

0db5c31 [Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters

10 years ago[Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last"...
Ulf [Thu, 15 May 2014 18:06:18 +0000]
[Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters

10 years agominor #1399 Fixed typo (WouterJ)
Fabien Potencier [Wed, 14 May 2014 11:51:43 +0000]
minor #1399 Fixed typo (WouterJ)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Fixed typo

Commits
-------

49de7a6 Fixed typo

10 years agoFixed typo
Wouter J [Wed, 14 May 2014 09:53:45 +0000]
Fixed typo

10 years agoadded some missing tests
Fabien Potencier [Mon, 12 May 2014 14:45:21 +0000]
added some missing tests

10 years agominor #1398 Remove unused constructor arguments (rybakit)
Fabien Potencier [Mon, 12 May 2014 14:36:16 +0000]
minor #1398 Remove unused constructor arguments (rybakit)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Remove unused constructor arguments

There are no line & tag arguments in `Twig_Node_Module::__construct()`.

Commits
-------

5b5741a Remove unused constructor arguments