Commit Graph

2345 Commits

Author SHA1 Message Date
Fabien Potencier fcbfac72d1 updated CHANGELOG 2014-10-11 01:29:15 +02:00
Fabien Potencier a2172363d7 bug #1531 Fixed usage of LimitIterator (grachov)
This PR was squashed before being merged into the 1.16-dev branch (closes #1531).

Discussion
----------

Fixed usage of LimitIterator

When you want to get all items from the start position to the end, for `array_slice` you should pass `null` as the `length` argument, while for `LimitIterator` it should be `-1`.

Commits
-------

f76e67f Fixed usage of LimitIterator
2014-10-11 01:28:34 +02:00
Andrey Grachov f76e67f91d Fixed usage of LimitIterator 2014-10-11 01:28:33 +02:00
Fabien Potencier 84df881b8b bumped version to 1.16.2-DEV 2014-10-10 20:56:23 +02:00
Fabien Potencier 7c4c01dcf5 prepared the 1.16.1 release v1.16.1 2014-10-10 16:09:53 +02:00
Fabien Potencier 943c9cfb12 updated CHANGELOG 2014-10-10 15:58:27 +02:00
Fabien Potencier bad42dbb32 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
2014-10-10 15:57:57 +02:00
Fabien Potencier c2a973af13 updated CHANGELOG 2014-10-10 15:47:26 +02:00
Fabien Potencier 194f6a14dc 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
2014-10-10 15:46:25 +02:00
Fabien Potencier 593c3684b2 updated CHANGELOG 2014-10-10 15:40:19 +02:00
Fabien Potencier 286b36bf66 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
2014-10-10 15:38:59 +02:00
Martin Hasoň 58efc421dc Improved error reporting in a sandboxed template 2014-10-10 15:36:50 +02:00
Martin Hasoň 42cd697667 Fixed guessing a template info for exceptions 2014-10-10 12:27:07 +02:00
Martin Hasoň 0e7cec5ece Fixed resetting debug info in compiler 2014-10-10 12:25:51 +02:00
Fabien Potencier 9fb15e343e updated CHANGELOG 2014-10-01 19:51:59 +02:00
Fabien Potencier 5b172b5175 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
2014-10-01 19:50:35 +02:00
Fabien Potencier 0d0cdba3bb udpated CHANGELOG 2014-10-01 19:13:04 +02:00
Fabien Potencier 1ed333bfb9 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
2014-10-01 19:09:15 +02:00
Fabien Potencier 0a179e801a fixed typo 2014-10-01 13:22:22 +02:00
Fabien Potencier 0b2f373fc4 deprecated Node::toXml() 2014-10-01 13:19:23 +02:00
Fabien Potencier fcdb9487cc 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
2014-10-01 07:31:33 +02:00
Fabien Potencier 9c12486651 fixed some assertions 2014-09-30 19:44:16 +02:00
Fabien Potencier 53b7001342 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
2014-09-30 19:40:30 +02:00
Rhodri Pugh c740060051 fix inconsistent response from twig_slice 2014-09-30 19:40:27 +02:00
Fabien Potencier 82cd5475a3 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
2014-09-30 19:37:32 +02:00
Brandon Kelly 2f5a927b72 date() documentation correction 2014-09-30 10:07:37 -07:00
binarious 4e1d9a7522 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.
2014-09-22 11:29:45 +02:00
Anthony Sterling fdddb1c91e Use LimitIterator on Iterable objects within the splice filter 2014-09-10 15:32:22 +01:00
Fabien Potencier 084ca201a7 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
2014-09-02 16:08:17 +02:00
kazusuke sasezaki ed7004b524 add PHP 5.6 to .travis.yml 2014-08-29 00:51:54 +09:00
Fabien Potencier 9cd07271c3 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
2014-08-27 11:26:36 +02:00
Fabien Potencier a4867487f2 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
2014-08-27 11:25:58 +02:00
Fabien Potencier 07b8651ce9 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
2014-08-27 11:24:21 +02:00
Andrej Hudec f712b8f8e6 Added note about array_merge php function 2014-08-24 00:31:40 +02:00
John Berberich 4e1515c3c5 Delimit comment in template using correct syntax
Enclose the comment in '{# #}' instead of beginning line with '#'.
2014-08-22 10:11:09 -04:00
Fabien Potencier e2d2a250d9 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.
2014-08-06 08:46:32 +02:00
Tugdual Saunier 759a77d040 [Ext] updating Twig extension for previous commit 2014-08-06 07:18:48 +01:00
Javier Spagnoletti 15ce450e32 Improved exception message while trying to access an attribute from an empty array. 2014-08-06 07:18:32 +01:00
Martin Hasoň 9b6497f383 Fixed "in" operator 2014-08-05 15:28:57 +02:00
Fabien Potencier da2d52b022 updated CHANGELOG 2014-08-05 14:54:54 +02:00
Soatok 3c48cb1140 Update installation.rst
Refer to PGP signature verification in the installation instructions for tarballs.
2014-08-05 08:33:51 -04:00
Fabien Potencier 3e6c9551eb changed the way we check for HHVM 2014-08-04 21:55:24 +02:00
Fabien Potencier 1d093a4137 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
2014-08-04 21:54:18 +02:00
Martin Hasoň 0c169ce98c Fixed a test on hhvm 2014-08-04 12:46:42 +02:00
Fabien Potencier 54da75aebf 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
2014-08-03 10:10:53 +02:00
Martin Hasoň 4c26981ce5 Fixed "starts with" a "ends with" operators for non-string arguments 2014-08-02 17:11:21 +02:00
Fabien Potencier 0c508d2703 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
2014-08-01 17:28:52 +02:00
Martin Hasoň 790305af93 Fixed 'starts with' operator for empty needle 2014-08-01 14:43:36 +02:00
Fabien Potencier 21f0b829f9 added more docs for the if tag 2014-08-01 09:38:44 +02:00
Fabien Potencier c03a7a323a fixed the attribute() function when passing a variable for the arguments 2014-08-01 09:18:16 +02:00