Commit Graph

2281 Commits

Author SHA1 Message Date
Sergey Linnik 33ca8d11cb optimize access to loop, key and value variables 2014-07-11 17:00:19 +04:00
Fabien Potencier 5fd428ed76 fixed some typos 2014-07-08 15:46:25 +02:00
Fabien Potencier 82a034c591 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
2014-07-08 15:44:12 +02:00
Fabien Potencier 31e2a79735 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
2014-07-08 15:42:48 +02:00
Fabien Potencier 11ea5976e3 bumped version to 1.16.1-DEV 2014-07-07 14:54:10 +02:00
Barry vd. Heuvel 06ca7f9837 Typo in deprecated.rst 2014-07-05 14:50:30 +02:00
Fabien Potencier 8ce3711580 prepared the 1.16.0 release v1.16.0 2014-07-05 14:19:05 +02:00
Fabien Potencier eed777f8d8 replaced deprecated divisibleby by divisible by in tests 2014-07-05 14:12:06 +02:00
Fabien Potencier eeeef75f0a replaced deprecated sameas by same as in tests 2014-07-05 14:06:29 +02:00
Fabien Potencier 1e71b52757 fixed some deprecation notices 2014-07-05 14:03:33 +02:00
Fabien Potencier f4c41f78a5 fixed the deprecated docs about PEAR 2014-07-05 13:37:05 +02:00
Fabien Potencier 23efa7b1c2 fixed potential exception 2014-07-05 13:16:15 +02:00
Fabien Potencier 251af26c75 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
2014-07-05 11:31:17 +02:00
Zoltan Radics c90d46988f Add 'PHP-twig for atom' package to IDEs support 2014-07-05 11:31:15 +02:00
Fabien Potencier 96336aba60 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
2014-06-20 09:26:46 +02:00
Seb Minderhoud 87165e7ea5 Update slice.rst 2014-06-19 09:49:36 +02:00
Fabien Potencier 1c0bec2814 added a note in the docs about the fact that installing the C ext is optional 2014-05-26 17:15:28 +02:00
Fabien Potencier 7c63a7df8a 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
2014-05-26 02:34:04 +02:00
Fabien Potencier 1930600e4e fixed url_encode when raw is false and URL is an array 2014-05-26 02:31:15 +02:00
Tobias Schultze 49ba6b4759 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
2014-05-26 02:23:10 +02:00
Fabien Potencier 4a7ef0ce0f updated CHANGELOG 2014-05-26 02:01:07 +02:00
Fabien Potencier f1aee16381 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
2014-05-26 02:00:46 +02:00
Fabien Potencier bee07e534b updated CHANGELOG 2014-05-26 01:57:56 +02:00
Fabien Potencier 02b80626f0 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
2014-05-26 01:57:06 +02:00
Fabien Potencier e6156e2e4d 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
2014-05-26 01:56:03 +02:00
Fabien Potencier fce3b8a928 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
2014-05-26 01:53:41 +02:00
Fabien Potencier 1f5b998453 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
2014-05-26 01:53:14 +02:00
Wagner Nicolas 0e228c719a [Doc]Put the return of the split filter in a variable 2014-05-26 01:53:13 +02:00
Matthieu Prat 1b3ac0aa16 Update json_encode.rst 2014-05-22 20:35:52 +02:00
Andreas Lutro 9dd3bb8220 Refactor namespace/shortname parsing into own method
Allows you to more easily create a custom file loader with a custom
namespace syntax.
2014-05-22 09:10:34 +02:00
Fabien Potencier c2ae310203 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
2014-05-21 03:15:25 +02:00
Adam Elsodaney e4b7db1705 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.
2014-05-20 15:02:48 +01:00
Fabien Potencier 55253c3f37 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
2014-05-15 21:43:48 +02:00
Ulf 0db5c3100b [Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters 2014-05-15 21:43:46 +02:00
Fabien Potencier 6af8182fbd minor #1399 Fixed typo (WouterJ)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Fixed typo

Commits
-------

49de7a6 Fixed typo
2014-05-14 13:51:43 +02:00
Wouter J 49de7a6b04 Fixed typo 2014-05-14 11:53:45 +02:00
Fabien Potencier cd4a372738 added some missing tests 2014-05-12 16:45:36 +02:00
Fabien Potencier 16e30cff9f 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
2014-05-12 16:36:16 +02:00
Eugene Leonovich 5b5741a7a4 Remove unused constructor arguments
There are no `line` and `nodeTag` arguments in `Twig_Node_Module::__construct()`
2014-05-12 16:12:37 +02:00
Fabien Potencier 052eb5d1ed fixed markpu 2014-05-05 10:48:03 +02:00
Fabien Potencier 84dcec3086 removed beta versions for PEAR in the docs 2014-05-05 10:32:59 +02:00
Fabien Potencier 1796eb1d95 added a note about PEAR deprecation in the docs 2014-05-05 10:29:57 +02:00
Fabien Potencier 4a6e7ff3d5 minor #1392 Update internals.rst (ahsio)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Update internals.rst

Fixed typo (Bad escaping strategy).

Commits
-------

d0de473 Fixed typo (escaping strategy).
2014-04-29 19:01:20 +02:00
Ahmed Siouani d0de4731f6 Fixed typo (escaping strategy). 2014-04-29 17:56:23 +02:00
Fabien Potencier 28256f5eda minor #1389 Move method so it's only called when necessary (Tobion)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Move method so it's only called when necessary

Small performance improvement for getAttribute

Commits
-------

a28e0f1 Move method so it's only called when necessary
2014-04-23 22:31:20 +02:00
Tobias Schultze a28e0f11c8 Move method so it's only called when necessary 2014-04-23 21:58:07 +02:00
Fabien Potencier 5b64c3c6d8 minor #1383 Consistency (fabpot)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Consistency

Commits
-------

365feec made usage of return; instead of return null;
81699ca made types consistent with the ones of Hack
2014-04-23 20:34:55 +02:00
Fabien Potencier 365feec87e made usage of return; instead of return null; 2014-04-16 12:37:16 +02:00
Fabien Potencier 81699ca6ca made types consistent with the ones of Hack 2014-04-16 12:37:16 +02:00
Fabien Potencier af6910e1a7 minor #1375 Fix typo: filters => filter (ifdattic)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Fix typo: filters => filter

Commits
-------

a8a1f12 Fix typo: filters => filter
2014-04-15 22:49:49 +02:00