Commit Graph

1933 Commits

Author SHA1 Message Date
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
Fabien Potencier 2acd63ae31 added a precedence example (refs #1057) 2013-05-01 10:03:10 +02:00
Fabien Potencier 04bc0698cc added missing operators in the precedence docs (closes #1057) 2013-05-01 08:53:54 +02:00
Fabien Potencier eaf5a2db54 fixed the autoloader for PHP 5.2 2013-05-01 08:42:53 +02:00
Fabien Potencier a20a46ab4a simplified code 2013-05-01 07:10:30 +02:00
Fabien Potencier f29bebbed0 merged branch hason/tests_autoloader (PR #994)
This PR was merged into the master branch.

Discussion
----------

Fixed autoloader registration for tests if phpunit is installed as package together with Twig

Commits
-------

19869ce Fixed autoloader registration for tests if phpunit is installed as package together with Twig
2013-05-01 07:08:24 +02:00
Fabien Potencier b7abf4d5e5 tweaked docs for the set tag (closes #1029) 2013-05-01 07:02:11 +02:00
Fabien Potencier 90b537cc23 merged branch include-x/master (PR #1068)
This PR was merged into the master branch.

Discussion
----------

Fixes typo in documentation, "if" tag

Commits
-------

da635ba Fixes typo
2013-05-01 06:48:52 +02:00
Sema da635ba7ca Fixes typo 2013-04-27 19:59:05 +04:00
Fabien Potencier 536ea37d1f removed obsolete call to ini_set 2013-04-26 11:34:36 +02:00
Fabien Potencier 501ecc5df3 merged branch lyrixx/feat-cli (PR #1062)
This PR was merged into the master branch.

Discussion
----------

Debug extension is safe in a cli context

Commits
-------

08b4a73 Debug extension is safe in a cli context
2013-04-24 16:49:01 +02:00
Fabien Potencier ddde9302f8 merged branch jezhalford/patch-1 (PR #1067)
This PR was merged into the master branch.

Discussion
----------

Made macro documentation clearer

Previous wording implied (to me at least) that macros *are* PHP functions.

Commits
-------

c155932 Made macro doc clearer
2013-04-24 16:31:03 +02:00
Jez Halford c155932490 Made macro doc clearer
Previous wording implied (to me at least) that macros *are* PHP functions.
2013-04-24 16:03:23 +02:00
Martin Hasoň 19869ce00c Fixed autoloader registration for tests if phpunit is installed as package together with Twig 2013-04-22 23:29:01 +02:00
Grégoire Pineau 08b4a73791 Debug extension is safe in a cli context 2013-04-21 16:30:55 +02:00
Fabien Potencier 80fd11cbbe merged branch weaverryan/patch-1 (PR #1060)
This PR was merged into the master branch.

Discussion
----------

Fixed small typo in link for "pre-built DLL"

Hey!

Very easy - this fixes a link that wasn't generating correctly.

Thanks!

Commits
-------

28673b1 Fixed small typo in link for "pre-built DLL"
2013-04-17 14:07:50 +02:00
Ryan Weaver 28673b1876 Fixed small typo in link for "pre-built DLL"
This fixes a link that wasn't generating correctly.
2013-04-17 09:01:55 -03:00
Fabien Potencier 887b6ee797 merged branch cordoval/patch-2 (PR #1056)
This PR was merged into the master branch.

Discussion
----------

improve readability

Commits
-------

a4daa4c update
6a25c5d improve readability
2013-04-15 11:43:17 +02:00
Luis Cordova a4daa4ca94 update 2013-04-13 12:53:49 -05:00
Luis Cordova 6a25c5db56 improve readability 2013-04-13 12:42:07 -05:00
Fabien Potencier f9ad8c089d merged branch jibriss/fix_defined (PR #1051)
This PR was merged into the master branch.

Discussion
----------

Fixed : fatal error when using defined test on an invalid expression

Commits
-------

e285228 Fixed : fatal error when using defined test on an invalid expression
2013-04-13 08:32:43 +02:00
Fabien Potencier 5845c1fb74 merged branch cordoval/patch-2 (PR #1055)
This PR was merged into the master branch.

Discussion
----------

typo

Commits
-------

e3b9e99 typo
2013-04-13 08:32:05 +02:00
Luis Cordova e3b9e99d4d typo 2013-04-13 00:37:28 -05:00
Fabien Potencier 8bbbecd08e merged branch drewjw81/extension_global_fix (PR #1053)
This PR was squashed before being merged into the master branch (closes #1053).

Discussion
----------

Prevent extensions from clobbering all globals.

It's possible for a poorly written extension to destroy all global variables by returning nothing.  This prevents that and throws an E_WARNING to notify the developer.

Commits
-------

7c8acf7 Prevent extensions from clobbering all globals.
2013-04-12 11:46:40 +02:00
Andrew Winter 7c8acf712e Prevent extensions from clobbering all globals. 2013-04-12 11:46:40 +02:00