Commit Graph

7732 Commits

Author SHA1 Message Date
Arnaud Buathier 87d4f083bb Simple enhancement for easy overloading 2013-12-27 15:35:40 +01:00
Fabien Potencier 2b0b904340 minor #1290 [Docs] Fix example: space missing between concatenated strings (GromNaN)
This PR was merged into the 1.15-dev branch.

Discussion
----------

[Docs] Fix example: space missing between concatenated strings

The expression `'Hello'~'Fabien'` produces `'HelloFabien'`, not `'Hello Fabien'`. I've just added a space after `'Hello'`.

Commits
-------

d6e0357 Fix doc example: space missing between concatenated strings
2013-12-27 15:27:14 +01:00
Fabien Potencier cb43b1234d Revert "merged branch javer/hhvm-array-traversable (PR #1192)"
This reverts commit 0d97eb9528, reversing
changes made to 4fcaf0c5fc.

This change is not needed anymore as HHVM has been fixed as of 2.3.0.
2013-12-27 15:21:16 +01:00
Fabien Potencier 81ef1380ee fixed Travis config to allow HHVM to fail 2013-12-27 15:13:51 +01:00
Fabien Potencier 996c286fdd minor #1294 Add HHVM to build matrix (ptarjan)
This PR was squashed before being merged into the 1.15-dev branch (closes #1294).

Discussion
----------

Add HHVM to build matrix

Now that HHVM can run your project, lets keep it that way

Commits
-------

e03b05e Add HHVM to build matrix
2013-12-27 15:12:46 +01:00
Paul Tarjan e03b05e0dc Add HHVM to build matrix 2013-12-27 15:12:45 +01:00
Fabien Potencier 6387fc4577 minor #1291 Fixed rendering of `-3` (ureimers)
This PR was merged into the master branch.

Discussion
----------

Fixed rendering of ``-3``

The missing space between "``-3``" and "(this is just syntactic[...])" led to the ``-3`` being rendered wrong. The parser must've ignored the closing "``" when it was directly followed by a non-space character.

Commits
-------

d8ea1b1 Fixed rendering of ``-3``
2013-12-10 11:23:00 +01:00
ureimers d8ea1b1784 Fixed rendering of `-3`
The missing space between "``-3``" and "(this is just syntactic[...])" led to the ``-3`` being rendered wrong. The parser must've ignored the closing "``" when it was directly followed by a non-space character.
2013-12-10 11:19:22 +01:00
Jérôme Tamarelle d6e03576f6 Fix doc example: space missing between concatenated strings 2013-12-07 20:09:53 +01:00
Fabien Potencier d5984bbb05 bug #1288 added an error message when trying to import an undefined block from a trait (fabpot)
This PR was merged into the master branch.

Discussion
----------

added an error message when trying to import an undefined block from a trait

Commits
-------

a2c6db7 added an error message when trying to import an undefined block from a trait
2013-12-06 16:28:39 +01:00
Fabien Potencier a2c6db7ea7 added an error message when trying to import an undefined block from a trait 2013-12-06 11:06:49 +01:00
Fabien Potencier 7066ce68ad bumped version to 1.15.1-DEV 2013-12-06 09:13:22 +01:00
Fabien Potencier 85e4ff9800 prepared the 1.15.0 release v1.15.0 2013-12-06 08:47:10 +01:00
Fabien Potencier fcecb284f0 fixed markup 2013-12-03 15:16:16 +01:00
Fabien Potencier 107fd201bf feature #1286 Adding ignoreStrictCheck option for call_user_func_array, if throwing exception (fabpot)
This PR was merged into the master branch.

Discussion
----------

Adding ignoreStrictCheck option for call_user_func_array, if throwing exception

Same as #1236 with added unit tests and C extension support (to come).

"I experienced the issue when using FuelPHP's ORM with EAV containers. When I tried to reference a property that was not defined I expected to get null, but instead the whole application stopped because an exception was thrown in the ORM, that no such function is present.

I couldn't find other possible exception that could be thrown when this function is called, so I assumed it's safe to take the ignoreStrictCheck into consideration here."

Commits
-------

1abf5d9 [ext] Mirroring PHP change for call_user_func_array, see #1286
9ab290b added tests for exceptions thrown in __call()
c711d37 Adding ignoreStrictCheck option for call_user_func_array, if throwing exception
2013-12-03 15:08:30 +01:00
Tugdual Saunier 1abf5d99fa [ext] Mirroring PHP change for call_user_func_array, see #1286 2013-12-03 15:03:12 +01:00
Fabien Potencier 9ab290bdb2 added tests for exceptions thrown in __call() 2013-12-03 14:14:58 +01:00
Fabien Potencier 7e7818e48f feature #1277 Added min and max function (lyrixx)
This PR was merged into the master branch.

Discussion
----------

Added min and max function

usefull for pagination

Commits
-------

6aa06de Added min and max function
2013-12-03 14:05:12 +01:00
Barta Tamás c711d37f1d Adding ignoreStrictCheck option for call_user_func_array, if throwing exception 2013-12-03 13:58:06 +01:00
Grégoire Pineau 6aa06dea05 Added min and max function 2013-12-03 13:46:57 +01:00
Fabien Potencier c9eca3508c fixed typo 2013-12-03 13:41:51 +01:00
Fabien Potencier 1747c337cb minor #1285 Corrected description of the "//" operator (ureimers)
This PR was merged into the master branch.

Discussion
----------

Corrected description of the "//" operator

The operator was previously described to truncate the the value when it in fact floors the result of the division (which can be seen in https://github.com/fabpot/Twig/blob/master/lib/Twig/Node/Expression/Binary/FloorDiv.php#L20).
By the old description one would think that ``{{ -20 // 7 }}`` would yield -2 (as in ``(int)(-20/7)``) when it actually returns -3 (as in ``floor(-20/7)``). Floor is not truncate (cast to int).

Commits
-------

a360bc0 Corrected description of the "//" operator
2013-12-03 13:41:40 +01:00
Fabien Potencier 697568bca2 fixed phpdoc 2013-12-03 13:38:38 +01:00
Fabien Potencier 05273c1502 feature #1261 added TokenStream::nextIf() (fabpot)
This PR was merged into the master branch.

Discussion
----------

added TokenStream::nextIf()

The introduction of `nextIf()` simplified a lot of code.

Commits
-------

0ed7898 added TokenStream::nextIf()
2013-12-03 13:29:21 +01:00
Fabien Potencier 0ed7898089 added TokenStream::nextIf() 2013-12-03 13:28:58 +01:00
ureimers a360bc037c Corrected description of the "//" operator
The operator was previously described to truncate the the value when it in fact floors the result of the division (which can be seen in https://github.com/fabpot/Twig/blob/master/lib/Twig/Node/Expression/Binary/FloorDiv.php#L20).
By the old description one would think that ``{{ -20 // 7 }}`` would yield -2 (as in ``(int)(-20/7)``) when it actually returns -3 (as in ``floor(-20/7)``). Floor is not truncate (cast to int).
2013-12-03 12:55:12 +01:00
Fabien Potencier cab9fd9a10 minor #1280 [Docs] Fix typos (bicpi)
This PR was merged into the master branch.

Discussion
----------

[Docs] Fix typos

Commits
-------

6ea9d8f [Docs] Fix typos
2013-11-24 19:36:20 +01:00
Philipp Rieber 6ea9d8f17d [Docs] Fix typos 2013-11-24 06:39:33 +01:00
Fabien Potencier f7c00d336f feature #1255 added the round filter (fabpot)
This PR was merged into the master branch.

Discussion
----------

added the round filter

fixes #1238

Commits
-------

ff4a7d2 added the round filter
2013-11-23 22:24:07 +01:00
Fabien Potencier 65880a7877 minor #1279 [Docs] Some minor fixes: Typos, Notations, Formatting (bicpi)
This PR was merged into the master branch.

Discussion
----------

[Docs] Some minor fixes: Typos, Notations, Formatting

Fixes for:
* Notations: html > HTML; javascript > JavaScript; composer > Composer
* Typos
* Wrong function names: ``escaper`` > ``escape``; ``include`` > ``source`` (in new chapter about ``source``)
* Formatting issues, e.g. remove RST from code blocks, it's not evaluated
* Wording where code sample outputs something: returns > outputs
* ``true`` parameter for ``autoescape`` - not needed any more

Commits
-------

a21df95 [Docs] Some minor fixes: Typos, Notations
2013-11-23 22:23:01 +01:00
Philipp Rieber a21df952ab [Docs] Some minor fixes: Typos, Notations 2013-11-23 21:51:26 +01:00
Fabien Potencier 39eb50c00e fixed optimizer max value 2013-11-14 09:08:49 +01:00
Fabien Potencier 2d012c4a4a minor #1270 Use string instead of large integer (ptarjan)
This PR was merged into the master branch.

Discussion
----------

Use string instead of large integer

HHVM differs from php-src on large integer parsing (php-src converts
them to floats, HHVM truncates them but leaves them as integers). The
point of this test is to make sure Twig parses it correctly, not the
underlying PHP execution engine.

Commits
-------

d401717 Use string instead of large integer
2013-11-13 09:11:09 +01:00
ptarjan d40171701f Use string instead of large integer
HHVM differs from php-src on large integer parsing (php-src converts
them to floats, HHVM truncates them but leaves them as integers). The
point of this test is to make sure Twig parses it correctly, not the
underlying PHP execution engine.
2013-11-12 23:38:46 -08:00
Fabien Potencier 8f7bea047e minor #1269 various cleanups (cordoval)
This PR was squashed before being merged into the master branch (closes #1269).

Discussion
----------

various cleanups

fix bool -> Boolean for consistency in other parts of twig's code removing
assignment to n as it is never used fix typo and docblock for consistency
remove line break not needed for consistency fix array docblock for
consistency

Commits
-------

cb651e8 various cleanups
2013-11-12 18:59:00 +01:00
Luis Cordova cb651e8ebb various cleanups 2013-11-12 18:58:59 +01:00
Fabien Potencier ff4a7d29ac added the round filter 2013-11-12 08:49:56 +01:00
Fabien Potencier 10da58c83b moved README to rst 2013-11-11 20:04:42 +01:00
Fabien Potencier cf21274a00 minor #1260 fix typo 'in' operator (thewholelifetolearn)
This PR was merged into the master branch.

Discussion
----------

fix typo 'in' operator

Fixed a small typo in the negative 'in' test operator

Commits
-------

f9013d5 fix typo 'in' operator
2013-11-06 11:15:23 +01:00
Ralph KEMPS f9013d5546 fix typo 'in' operator
Fixed a small typo in the negative 'in' test operator
2013-11-06 10:39:15 +01:00
Fabien Potencier 3a6ffbb0f0 minor #1259 Fixed ZendServer specific DLL Path in install doc (tucksaun)
This PR was merged into the master branch.

Discussion
----------

Fixed ZendServer specific DLL Path in install doc

It seems the \ need to be escaped in the tip section.

(see the file on github or the Twig website)

Commits
-------

2b102e3 Fixed ZendServer specific DLL Path in install doc
2013-11-03 20:14:49 +01:00
Tugdual Saunier 2b102e366b Fixed ZendServer specific DLL Path in install doc
It seems the \ need to be escaped in the tip section.

(see the file on github or the Twig website)
2013-11-03 20:10:18 +01:00
Fabien Potencier 0906728a74 updated CHANGELOG 2013-11-03 10:12:32 +01:00
Fabien Potencier bdb5f8f02e bug #1258 Fix twig_first and twig_last filters for UTF8 multibyte strings (chEbba)
This PR was squashed before being merged into the master branch (closes #1258).

Discussion
----------

Fix twig_first and twig_last filters for UTF8 multibyte strings

After string is sliced we already have the right result with a first/last letter for UTF8 string.

Commits
-------

6003ae4 Fix twig_first and twig_last filters for UTF8 multibyte strings
2013-11-03 10:11:57 +01:00
Kirill chEbba Chebunin 6003ae43b9 Fix twig_first and twig_last filters for UTF8 multibyte strings 2013-11-03 10:11:57 +01:00
Fabien Potencier 6aea4d97b6 feature #1257 added a source function to include the content of a template without rendering it (fabpot)
This PR was merged into the master branch.

Discussion
----------

added a source function to include the content of a template without rendering it

Replaces #1230.

There is one question about the implementation: Should the content be considered safe (which is the current implementation)?

Commits
-------

dff7d2c added a source function to include the content of a template without rendering it
2013-11-02 21:45:37 +01:00
Fabien Potencier dff7d2c758 added a source function to include the content of a template without rendering it 2013-10-31 13:38:11 +01:00
Fabien Potencier 726a40a1b4 bumped version to 1.15 2013-10-31 13:37:55 +01:00
Fabien Potencier bc32ed81d5 Revert "merged branch Cottser/master (PR #1071)"
This reverts commit 2f5c9899a4, reversing
changes made to 4e7094f6a3.

Conflicts:
	lib/Twig/Environment.php
2013-10-31 13:17:35 +01:00
Fabien Potencier 43b8338e04 bug #1256 Fixed C extension sandbox behavior (tucksaun)
This PR was squashed before being merged into the master branch (closes #1256).

Discussion
----------

Fixed C extension sandbox behavior

fixes #1254

Commits
-------

40bba0e Fixed C extension sandbox behavior
2013-10-31 12:37:11 +01:00