Commit Graph

2873 Commits

Author SHA1 Message Date
Fabien Potencier e548cbe3a4 deprecated some more methods on Twig_Environment 2016-09-18 18:40:16 -07:00
Fabien Potencier c418d07c64 bumped version to 1.24.3-DEV 2016-09-01 10:55:16 -07:00
Fabien Potencier 33093f6e31 prepared the 1.24.2 release v1.24.2 2016-09-01 10:50:53 -07:00
Fabien Potencier dbe9171cb9 updated CHANGELOG 2016-09-01 10:50:22 -07:00
Fabien Potencier 50b1b87d2f minor #2105 Floor - use cast and not intval (SpacePossum)
This PR was squashed before being merged into the 1.x branch (closes #2105).

Discussion
----------

Floor - use cast and not intval

Use cast in fav. of the `inval`, because;
- its faster
- cannot be overloaded
- less chars

Commits
-------

39d46ac Floor - use cast and not intval
2016-08-31 11:41:07 -07:00
SpacePossum 39d46acf7d Floor - use cast and not intval 2016-08-31 11:41:06 -07:00
Fabien Potencier ffa2b812b0 fixed CS 2016-08-17 17:09:08 -07:00
Fabien Potencier d726bde293 bug #2054 Fix static callable. (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

Fix static callable.

fixes https://github.com/twigphp/Twig/issues/2053

Commits
-------

8f6fd57 Fix exception message for static method and object without req. params.
2016-08-17 17:08:36 -07:00
Fabien Potencier 21039777d8 minor #2062 [DOC] add named macro end-tag documentation (JakeFr)
This PR was merged into the 1.x branch.

Discussion
----------

[DOC] add named macro end-tag documentation

Hello!
Just discover endmacro tag supports name, just like block.
But it is not mentionned in the doc.
So here's a PR

Commits
-------

dcc5f45 add named macro end-tag documentation
2016-08-15 10:25:09 -07:00
Fabien Potencier 13b35b8380 minor #2090 Do not mix indention levels (greg0ire)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2090).

Discussion
----------

Do not mix indention levels

Not sure if this was intentional, but the "if" line had an indention of 3 spaces,
while the "true" line has an indention of 4 spaces.

Commits
-------

507f697 Do not mix indention levels
2016-08-15 10:21:29 -07:00
Grégoire Paris 507f697ad0 Do not mix indention levels
Not sure if this was intentional, but the "if" line had an indention of 3 spaces,
while the "true" line has an indention of 4 spaces.
2016-08-15 10:21:29 -07:00
Fabien Potencier b7cd3a88dc fixed typo 2016-07-28 16:58:48 -04:00
Fabien Potencier 34bdf7e489 minor #2080 Add Visual Studio Code to the list of IDE integrations (SahAssar)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2080).

Discussion
----------

Add Visual Studio Code to the list of IDE integrations

With the "TWIG pack" extension.

Commits
-------

e8b16c0 Add Visual Studio Code to the list of IDE integrations
2016-07-28 16:58:12 -04:00
Svante Richter e8b16c0693 Add Visual Studio Code to the list of IDE integrations
With the "TWIG pack" extension.
2016-07-28 16:58:12 -04:00
Fabien Potencier 016b363ef6 minor #2087 Fixed all deprecation notices by using getMockBuilder (SamMousa)
This PR was squashed before being merged into the 1.x branch (closes #2087).

Discussion
----------

Fixed all deprecation notices by using `getMockBuilder`

Fixes deprecation notices on PHPUnit 5.4 without using 5.4 specific features.

Commits
-------

17e0caa Fixed all deprecation notices by using
2016-07-28 16:56:10 -04:00
Sam Mousa 17e0caa91a Fixed all deprecation notices by using 2016-07-28 16:56:02 -04:00
Fabien Potencier c535bc0b56 minor #2076 [Doc] Fixed small error in code example (King2500)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2076).

Discussion
----------

[Doc] Fixed small error in code example

*see changes*

Commits
-------

dc798d3 [Doc] Fixed small error in code example
2016-07-10 09:48:21 +02:00
Thomas Schulz dc798d3bbb [Doc] Fixed small error in code example 2016-07-10 09:48:21 +02:00
Fabien Potencier cdccdbbdf3 minor #2065 Update macro.rst (dubaaron)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2065).

Discussion
----------

Update macro.rst

Small grammar fix: subject-verb agreement "Macros differ" vs "Macros differs"

Commits
-------

0800545 Update macro.rst
2016-06-24 07:05:43 +02:00
Aaron Wallentine 080054501f Update macro.rst
Small grammar fix: subject-verb agreement "Macros differ" vs "Macros differs"
2016-06-24 07:05:43 +02:00
Fabien Potencier 25cf1527a7 minor #2066 Update use.rst (dubaaron)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2066).

Discussion
----------

Update use.rst

Small grammar fix.

Commits
-------

08c830a Update use.rst
2016-06-24 07:05:20 +02:00
Aaron Wallentine 08c830a5aa Update use.rst
Small grammar fix.
2016-06-24 07:05:20 +02:00
SpacePossum 8f6fd57a7e Fix exception message for static method and object without req. params. 2016-06-22 09:22:42 +02:00
JakeFr dcc5f450de add named macro end-tag documentation 2016-06-21 11:36:37 +02:00
Fabien Potencier 68620b32e4 fixed CS 2016-06-21 09:05:03 +02:00
Fabien Potencier c561e890bd bug #2043 Fix load cache (MaCroTux)
This PR was squashed before being merged into the 1.x branch (closes #2043).

Discussion
----------

Fix load cache

In PHP7 @ do not works and it is resource expensive, switching to if statement.

Commits
-------

b5df3d1 Fix load cache
2016-06-21 09:04:26 +02:00
Javier Feria b5df3d1dbe Fix load cache 2016-06-21 09:04:23 +02:00
Fabien Potencier 9abbf273bd minor #2058 Minor rst syntax tweaks (javiereguiluz)
This PR was merged into the 1.x branch.

Discussion
----------

Minor rst syntax tweaks

It looks like you can't show `<code>` inside italics with RST. This is how the current docs look when rendered:

![rst_syntax_issue](https://cloud.githubusercontent.com/assets/73419/16001277/7cf476ee-3151-11e6-99f7-da9d94ffff4e.png)

Commits
-------

b42ddb3 Minor rst syntax tweaks
2016-06-13 11:11:51 +02:00
Javier Eguiluz b42ddb3989 Minor rst syntax tweaks 2016-06-13 10:25:29 +02:00
Fabien Potencier e9ce4607d4 bug #2052 fix a case where the autoescaping does not work as expected (uwej711)
This PR was merged into the 1.x branch.

Discussion
----------

fix a case where the autoescaping does not work as expected

The Twig_NodeVisitor_Escaper collects a list of blocks for all templates that it visits. If you define the same block (i.e. with the same name) in txt and html templates this results sometimes in the html block not being escapes.

This is illustrated in the added test.

To fix it, I propose to reset the list of the blocks for each module.

Alternatively we need to make clear that blocks should not share names between text and html templates.

Commits
-------

48a3487 Reset blocks also in doLeaveNode
ee6965e fix a case where the autoescaping does not work as expected
2016-06-08 17:42:12 +02:00
Uwe Jäger 48a3487f46 Reset blocks also in doLeaveNode 2016-06-02 08:55:29 +02:00
Uwe Jäger ee6965ed00 fix a case where the autoescaping does not work as expected
The Twig_NodeVisitor_Escaper collects a list of blocks for all templates that it visits. If you define the same block (i.e. with the same name) in txt and html templates this results sometimes in the html block not being escapes.

This is illustrated in the added test.

To fix it, I propose to reset the list of the blocks for each module.

Alternatively we need to make clear that blocks should not share names between text and html templates.
2016-06-02 08:40:59 +02:00
Fabien Potencier a2400a8dd1 bumped version to 1.24.2-DEV 2016-05-30 11:17:27 +02:00
Fabien Potencier 3566d311a9 prepared the 1.24.1 release v1.24.1 2016-05-30 11:11:59 +02:00
Fabien Potencier f356469370 updated CHANGELOG 2016-05-30 11:09:04 +02:00
Fabien Potencier dad282fb44 bug #2040 handle Throwable (fprochazka)
This PR was merged into the 1.x branch.

Discussion
----------

handle Throwable

Related #2041

Commits
-------

99e9d1c handle Throwable
2016-05-30 11:04:21 +02:00
Fabien Potencier 3dfda00462 minor #2044 Small fixes (ihatehandles)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2044).

Discussion
----------

Small fixes

Commits
-------

e81e698 Small fixes
2016-05-20 08:13:46 +02:00
Sam e81e698187 Small fixes 2016-05-20 08:13:46 +02:00
Fabien Potencier 71ad9ff322 minor #2029 Grammar (okj579)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2029).

Discussion
----------

Grammar

A few grammatical fixes.

Commits
-------

6dd784a Grammar
2016-05-13 14:46:43 -05:00
Owen Kieffer-Jones 6dd784a2d5 Grammar 2016-05-13 14:46:43 -05:00
Fabien Potencier 18aae109fa minor #2042 [DOC] recipes.rst uses Twig_Function_Function (JakeFr)
This PR was merged into the 1.x branch.

Discussion
----------

[DOC] recipes.rst uses Twig_Function_Function

Hello,
Here's a minor update for recipes.rst
I rewrite the code sample for registerUndefinedFunctionCallback to remove usage of deprecated class Twig_Function_Function.

Commits
-------

1a1ba8b [DOC] recipes.rst uses Twig_Function_Function
2016-05-13 14:43:49 -05:00
JakeFr 1a1ba8bba4 [DOC] recipes.rst uses Twig_Function_Function
Hello,
Here's a minor update for recipes.rst
I rewrite the code sample for registerUndefinedFunctionCallback to remove usage of deprecated class Twig_Function_Function.
2016-05-13 18:05:38 +02:00
Filip Procházka 99e9d1cf41 handle Throwable 2016-05-13 12:08:51 +02:00
Fabien Potencier f167cc0a65 minor #2021 fix a typo (add missing article) (xabbuh)
This PR was merged into the 1.x branch.

Discussion
----------

fix a typo (add missing article)

Commits
-------

e317c55 fix a typo (add missing article)
2016-04-24 15:54:56 +02:00
Fabien Potencier b1748ef989 bug #2023 [ExpressionParser] forbids true, false, null and none keywords for variables names. (hhamon)
This PR was merged into the 1.x branch.

Discussion
----------

[ExpressionParser] forbids true, false, null and none keywords for variables names.

Commits
-------

2e02f73 [ExpressionParser] forbids true, false, null and none keywords for variables names.
2016-04-24 15:54:15 +02:00
Hugo Hamon 2e02f73bf7 [ExpressionParser] forbids true, false, null and none keywords for variables names. 2016-04-23 16:02:43 +02:00
Christian Flothmann e317c559a8 fix a typo (add missing article) 2016-04-21 09:43:05 +02:00
Fabien Potencier babe6fca0e minor #2002 Implement Twig_Extension_GlobalsInterface on getGlobals example (totaltrash)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2002).

Discussion
----------

Implement Twig_Extension_GlobalsInterface on getGlobals example

I'm not sure if more information is required on when and why getGlobals was deprecated from Twig_Extension.

Refs #2001

Commits
-------

b8a987e Implement Twig_Extension_GlobalsInterface on getGlobals example
2016-04-20 08:47:43 +02:00
Darren Black b8a987ee33 Implement Twig_Extension_GlobalsInterface on getGlobals example 2016-04-20 08:47:42 +02:00
Fabien Potencier 3223e58253 minor #2005 [Doc] Add a note about escaping backslashes inside strings (javiereguiluz)
This PR was squashed before being merged into the 1.x branch (closes #2005).

Discussion
----------

[Doc] Add a note about escaping backslashes inside strings

Backslashes inside strings caused some confusion for some users. See https://github.com/symfony/symfony/issues/18207

Commits
-------

463ea80 [Doc] Add a note about escaping backslashes inside strings
2016-04-20 08:46:54 +02:00