Commit Graph

1957 Commits

Author SHA1 Message Date
Fabien Potencier 11fdec5664 updated the CHANGELOG with missing items 2013-06-06 08:02:21 +02:00
Fabien Potencier 11d2079104 added documentation for the preverse_keys argument of the reverse filter (closes #1112) 2013-06-06 07:56:57 +02:00
Fabien Potencier fca6a9562d merged branch stof/include_escaping (PR #1110)
This PR was merged into the master branch.

Discussion
----------

Made the include function safe for the autoescaping

This fixes a regression introduced in ba88c75557
Fixes #1097

I have not updated the changelog as the regression is not part of a release yet

Commits
-------

3bc113b Made the include function safe for the autoescaping
2013-05-29 16:58:12 +02:00
Christophe Coevoet 3bc113be2a Made the include function safe for the autoescaping
This fixes a regression introduced in ba88c75557
Fixes #1097
2013-05-29 15:08:43 +02:00
Fabien Potencier e8be092e18 merged branch luiges90/patch-1 (PR #1107)
This PR was merged into the master branch.

Discussion
----------

Update slice.rst

I was (somehow) misled by the example, thinking `'1234'[2:]` outputs `34` because it `2:` mean copy the last 2 characters...

This happens when you are in a hurry and didn't look into the text.

Let makes it less ambiguous.

Commits
-------

3ddff67 Update slice.rst
2013-05-29 09:19:45 +02:00
Fabien Potencier 641d2f95d1 merged branch jrobeson/patch-1 (PR #1108)
This PR was merged into the master branch.

Discussion
----------

change mention of print to sprintf in format filter

The format specifiers are actually mentioned on the [sprintf](http://php.net/sprintf) page

Commits
-------

5746c11 change mention of print to sprintf in format filter
2013-05-29 09:18:50 +02:00
Johnny Robeson 5746c11153 change mention of print to sprintf in format filter
The format specifiers are actually mentioned on the [sprintf(http://php.net/sprintf)] page
2013-05-29 04:15:52 -03:00
Peter WONG 3ddff676f8 Update slice.rst
I was (somehow) misled by the example, thinking `'1234'[2:]` outputs `34` because it `2:` mean copy the last 2 characters...

This happens when you are in a hurry and didn't look into the text.

Let makes it less ambiguous.
2013-05-29 11:18:36 +08:00
Fabien Potencier f6c00587f8 added the possibility to ignore the filesystem constructor argument (closes #1104) 2013-05-27 08:08:37 +02:00
Fabien Potencier fd9643071c fixed doc markup (closes #1106) 2013-05-27 08:04:18 +02:00
Fabien Potencier b081e3f1ed tweaked previous merge (refs #1103) 2013-05-25 17:56:42 +02:00
Fabien Potencier 6726e60155 merged branch kimu/patch-1 (PR #1103)
This PR was squashed before being merged into the master branch (closes #1103).

Discussion
----------

Added info about variable declarations inside a loop

Commits
-------

d5f4ec3 Added info about variable declarations inside a loop
2013-05-25 17:52:49 +02:00
kimu d5f4ec309b Added info about variable declarations inside a loop 2013-05-25 17:52:49 +02:00
Fabien Potencier c65c72be3d merged branch DieterDePaepe/patch-1 (PR #1105)
This PR was merged into the master branch.

Discussion
----------

Add missing semicolon

Commits
-------

550503e Add missing semicolon
2013-05-25 16:52:30 +02:00
DieterDePaepe 550503ec2d Add missing semicolon 2013-05-25 14:42:31 +02:00
Fabien Potencier 6939565867 added support for object instances as the second argument of the constant test (closes #1100) 2013-05-23 18:28:53 +02:00
Fabien Potencier ba88c75557 fixed the include function when used in an assignment (closes #1095) 2013-05-17 12:06:31 +02:00
Fabien Potencier f6ebd46fad merged branch hason/chain (PR #1093)
This PR was merged into the master branch.

Discussion
----------

Fixed Twig_Loader_Chain::exists for a loader which implements Twig_ExistsLoaderInterface

Commits
-------

8a662f2 Fixed Twig_Loader_Chain::exists for a loader which implements Twig_ExistsLoaderInterface
2013-05-15 16:22:32 +02:00
Martin Hasoň 8a662f2ab3 Fixed Twig_Loader_Chain::exists for a loader which implements Twig_ExistsLoaderInterface 2013-05-15 12:37:17 +02:00
Fabien Potencier 4e6ad3b568 removed unneeded code 2013-05-14 09:20:57 +02:00
Fabien Potencier 7b298c2d1f merged branch rrehbeindoi/error-memory (PR #1083)
This PR was squashed before being merged into the master branch (closes #1083).

Discussion
----------

Adjusted backtrace call to reduce memory usage

Commits
-------

cf3ee20 Adjusted backtrace call to reduce memory usage
2013-05-14 07:05:22 +02:00
Ray cf3ee203a2 Adjusted backtrace call to reduce memory usage 2013-05-14 07:05:22 +02:00
Fabien Potencier 9f2cbddc68 merged branch kosssi/feature/fix-typo (PR #1090)
This PR was merged into the master branch.

Discussion
----------

fix documentation code block

Commits
-------

e9c1979 fix documentation code block
2013-05-14 07:03:10 +02:00
Simon Constans e9c197967f fix documentation code block 2013-05-13 22:34:50 +02:00
Fabien Potencier a8395b3829 merged branch bamarni/docs-escape (PR #1087)
This PR was merged into the master branch.

Discussion
----------

[doc] switched a BC call

Commits
-------

12a5d02 [doc] switched a BC call
2013-05-13 13:46:19 +02:00
Bilal Amarni 12a5d026ed [doc] switched a BC call 2013-05-13 13:14:39 +02:00
Fabien Potencier 4a49a3ae30 bumped version to 1.13.1-DEV 2013-05-10 17:25:39 +02:00
Fabien Potencier d9b7bbd2dc prepared the 1.13.0 release v1.13.0 2013-05-10 17:12:43 +02:00
Fabien Potencier 4d90a5008d fixed CHANGELOG 2013-05-07 20:59:51 +02:00
Fabien Potencier cbbbab9065 merged branch Tobion/patch-1 (PR #1030)
This PR was merged into the master branch.

Discussion
----------

fix numeric & boolean & float keys in array

Reopened PR of #878

Commits
-------

2c56b70 Merge pull request #3 from tucksaun/patch-1
17d6cc7 [ext] fixed tabs
46012ce [ext] improvements
21f8062 [ext] code cleaning
9347c52 [ext] updated PHP code documenting C code
b41ce60 updated C extension accordingly
e5291e1 rename item to attribute in the exception message because that's the term that is used in twig, e.g. the  function
a93f0dc further improved exception message and distinguish array_call and any_call access
26bac14 added tests for array access with confusable keys
db744d5 fix test that that would not fail if no exception is thrown
9ea16ec refactored getAttribute
6fb5afa improved error message for non-existent or invalid attributes
fdfd506 added changelog entry about fixed boolean array access
da616c5 fixed getAttribute for array access with a boolean or float key
b6acf9d updated CHANGELOG
c4d5b3f added some unit tests for previous merge
e84448b fix numeric keys in array
2013-05-07 20:56:07 +02:00
Fabien Potencier 8503ff8101 udpated CHANGELOG 2013-05-07 20:41:54 +02:00
Fabien Potencier d441ad7c67 merged branch Seldaek/optim (PR #1077)
This PR was merged into the master branch.

Discussion
----------

Some more optimizations

Please look at commits one by one. Overall this makes the twig_escape_filter almost 20% faster here for happy path (escaping string for html with UTF-8) on 1000 calls. Still pretty darn slow, but faster.

Commits
-------

d886b12 Make happy path (strings) faster by avoiding the cast, same perfs for the other cases
97bf5e5 Avoid unnecessary is_object call
c1c0dcc Use uppercased charsets consistently (as in js/css/html_attr strategies)
a23fa62 Add UTF-8 in uppercase since it is so common
c891c53 Avoid strtolower call at every twig_escape_filter call
61f2b2a Use plain string comparison which is twice as fast
d4eec01 Move html case up since it is the most likely to be hit
2013-05-07 20:41:16 +02:00
Fabien Potencier 1fafbe48cc merged branch Seldaek/optim2 (PR #1078)
This PR was merged into the master branch.

Discussion
----------

Optimize resume after for loops by using + vs array_merge

The plus operator seems to be almost twice as fast as array_merge, so I think in this case and given it's compiled code not made for humans it's worth it. The only potential problem is if you use ints as keys then it won't have the same behavior as array_merge, but I don't know if twig supports this at all, and especially I doubt it's a good idea.

Commits
-------

d753241 Optimize resume after for loops by using + vs array_merge
2013-05-07 20:36:38 +02:00
Jordi Boggiano d753241ebb Optimize resume after for loops by using + vs array_merge 2013-05-06 15:11:10 +02:00
Jordi Boggiano d886b12637 Make happy path (strings) faster by avoiding the cast, same perfs for the other cases 2013-05-06 14:32:20 +02:00
Jordi Boggiano 97bf5e5c44 Avoid unnecessary is_object call 2013-05-06 14:31:38 +02:00
Jordi Boggiano c1c0dccfe3 Use uppercased charsets consistently (as in js/css/html_attr strategies) 2013-05-06 14:19:26 +02:00
Jordi Boggiano a23fa62331 Add UTF-8 in uppercase since it is so common 2013-05-06 14:15:40 +02:00
Jordi Boggiano c891c530d3 Avoid strtolower call at every twig_escape_filter call 2013-05-06 14:12:55 +02:00
Jordi Boggiano 61f2b2a9d8 Use plain string comparison which is twice as fast 2013-05-06 14:09:40 +02:00
Jordi Boggiano d4eec01a9b Move html case up since it is the most likely to be hit 2013-05-06 14:01:58 +02:00
Fabien Potencier b8a8701b6c merged branch lyrixx/patch-1 (PR #1075)
This PR was merged into the master branch.

Discussion
----------

Fixed php doc in Twig/Extension/StringLoader

Commits
-------

95353cb Fixed php doc in Twig/Extension/StringLoader
2013-05-06 08:36:47 +02:00
Fabien Potencier 5b94270c8c merged branch Seldaek/optim (PR #1074)
This PR was merged into the master branch.

Discussion
----------

Optimize initGlobals to do only one merge call

Commits
-------

086088e Optimize initGlobals to do only one merge call
2013-05-05 11:25:56 +02:00
Grégoire Pineau 95353cb0b4 Fixed php doc in Twig/Extension/StringLoader 2013-05-05 12:13:56 +03:00
Jordi Boggiano 086088e676 Optimize initGlobals to do only one merge call 2013-05-04 22:18:16 +02:00
Fabien Potencier 7f70bbf775 Merge pull request #1073 from fabpot/special-chars
changed ☃ to § in tests (closes #996)
2013-05-01 12:03:39 -07:00
Fabien Potencier c8fe253890 changed ☃ to § in tests (closes #996) 2013-05-01 20:44:33 +02:00
Fabien Potencier 9ec7e766fb fixed a unit test when run in isolation 2013-05-01 20:28:29 +02:00
Fabien Potencier 68ebc96722 merged branch fabpot/named-args (PR #1072)
This PR was merged into the master branch.

Discussion
----------

enforced usage of named arguments after positional ones

When we introduced named arguments, the behavior for when both positional and named arguments were used in a call was not clearly defined.

This PR addresses this issue by following Python rules:

 * No positional argument after named ones
 * No possibility to define an argument with both a positional argument and a named one

This introduces a BC break if people were using positional arguments after named ones, but I would argue that this is never a good idea anyway.

This is an alternative to #995

Commits
-------

135b618 enforced usage of named arguments after positional ones
2013-05-01 20:10:14 +02:00
Fabien Potencier 135b618ff9 enforced usage of named arguments after positional ones 2013-05-01 20:07:00 +02:00