Commit Graph

3609 Commits

Author SHA1 Message Date
Fabien Potencier 4f77fd5b48 minor #2912 Refactor the implementation of dump() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Refactor the implementation of dump()

Commits
-------

243021e6 refactored the implementation of dump()
2019-03-23 14:32:18 +01:00
Fabien Potencier 243021e690 refactored the implementation of dump() 2019-03-23 14:27:39 +01:00
Fabien Potencier deab8a7745 bumped version to 1.38.4-DEV 2019-03-21 15:50:42 +01:00
Fabien Potencier 5df0ef0ca2 prepared the 1.38.3 release v1.38.3 2019-03-21 15:50:13 +01:00
Fabien Potencier 01f39731da feature #2909 Allow Traversable objects to be used in the with keyword of the include and embed tags (thewilkybarkid)
This PR was squashed before being merged into the 1.x branch (closes #2909).

Discussion
----------

Allow Traversable objects to be used in the with keyword of the include and embed tags

Same as #2901 but for `include` and `embed`.

Commits
-------

068306fe Allow Traversable objects to be used in the with keyword of the include and embed tags
2019-03-21 15:27:58 +01:00
Chris Wilkinson 068306feb9 Allow Traversable objects to be used in the with keyword of the include and embed tags 2019-03-21 15:27:53 +01:00
Fabien Potencier 6cd3a72f26 fixed phpunit configuration 2019-03-20 19:20:34 +01:00
Fabien Potencier 828e82d07b removed debug code 2019-03-20 19:20:25 +01:00
Fabien Potencier 02f8423a3a feature #2901 Allow Traversable objects to be used in the with tag (thewilkybarkid)
This PR was merged into the 1.x branch.

Discussion
----------

Allow Traversable objects to be used in the with tag

Currently `with` does an `in_array()` check, this allows `Traversable`~/`JsonSerializable`~ objects to be used as they can also contain a hash.

Commits
-------

572a2a09 Allow Traversable objects to be used in the with tag
2019-03-20 07:18:37 +01:00
Chris Wilkinson 572a2a09fd Allow Traversable objects to be used in the with tag 2019-03-19 14:21:09 +00:00
Fabien Potencier f0efbc5b20 fixed typo 2019-03-19 14:07:27 +01:00
Fabien Potencier 931a8b5cdf removed some usage of loadTemplate in tests 2019-03-16 11:32:43 +01:00
Fabien Potencier f5689b50e5 updated CHANGELOG 2019-03-15 17:31:30 +01:00
Fabien Potencier ee0df8d069 bug #2902 Fix BC break on Environment::resolveTemplate() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix BC break on Environment::resolveTemplate()

closes #2900

Commits
-------

b24d5256 fixed BC break on Environment::resolveTemplate()
2019-03-15 17:29:14 +01:00
Fabien Potencier b24d52565a fixed BC break on Environment::resolveTemplate() 2019-03-15 17:25:18 +01:00
Fabien Potencier a482da9fd0 bug #2899 Fixed spaceless filter (tifabien)
This PR was merged into the 1.x branch.

Discussion
----------

Fixed spaceless filter

As now the `spaceless` tag is deprecated, I tried to replace it by the new `spaceless` filter instead but it broke my application. Actually there is a difference between the tag and the filter. Spaceless tag trim also whistespace (or line feed).

I propose to do the same thing on the new filter.

Commits
-------

3412d1a5 Fixed spaceless filter
2019-03-14 14:57:20 +01:00
Fabien Lucas 3412d1a56a Fixed spaceless filter 2019-03-14 11:35:56 +01:00
Fabien Potencier e04a9a248f added some missing tests 2019-03-14 10:06:54 +01:00
Fabien Potencier df60e7003c bug #2896 Fix the autoloader to take into account namespaced classes (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix the autoloader to take into account namespaced classes

fixes #2895

Commits
-------

0c1d18b9 fixed the autoloader to take into account namespaced classes
2019-03-14 07:46:27 +01:00
Fabien Potencier 0c1d18b90a fixed the autoloader to take into account namespaced classes 2019-03-14 07:45:39 +01:00
Fabien Potencier 8c18e7d063 added some tests for the set tag 2019-03-13 10:57:08 +01:00
Fabien Potencier dae3b1cead bumped version to 1.38.3-DEV 2019-03-12 19:46:15 +01:00
Fabien Potencier 874adbd922 prepared the 1.38.2 release v1.38.2 2019-03-12 19:45:24 +01:00
Fabien Potencier c0d5991cf7 feature #2893 Add TemplateWrapper::getTemplateName() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Add TemplateWrapper::getTemplateName()

closes #2892

Commits
-------

861066e5 added TemplateWrapper::getTemplateName()
2019-03-12 19:40:48 +01:00
Fabien Potencier 861066e50b added TemplateWrapper::getTemplateName() 2019-03-12 19:33:04 +01:00
Fabien Potencier b0d8cd7788 bumped version to 1.38.2-DEV 2019-03-12 16:43:49 +01:00
Fabien Potencier 88fc6d1454 prepared the 1.38.1 release v1.38.1 2019-03-12 16:43:04 +01:00
Fabien Potencier 675686844a updated CHANGELOG 2019-03-12 16:41:40 +01:00
Fabien Potencier fb19ea7dde fixed CS 2019-03-12 16:38:19 +01:00
Fabien Potencier dd22fe6f84 bug #2887 Force loading class aliases used in typehints (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Force loading class aliases used in typehints

Fixes #2886

Commits
-------

65c05591 force loading class aliases used in typehints
2019-03-12 16:35:38 +01:00
Christophe Coevoet 65c0559125 force loading class aliases used in typehints 2019-03-12 15:24:00 +01:00
Fabien Potencier 47297c2ae9 bumped version to 1.38.1-DEV 2019-03-12 13:43:05 +01:00
Fabien Potencier 754b8dfc00 prepared the 1.38.0 release v1.38.0 2019-03-12 13:42:04 +01:00
Fabien Potencier 0f3af98ef6 security #2885 Fix security issue in the sandbox (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix security issue in the sandbox

Commits
-------

eac54229 fixed security issue in the sandbox
2019-03-12 13:35:01 +01:00
Fabien Potencier 5e1a3615bc removed one usage of Template vs TemplateWrapper 2019-03-12 11:16:55 +01:00
Fabien Potencier eac5422956 fixed security issue in the sandbox 2019-03-12 11:09:54 +01:00
Fabien Potencier 7e305693b0 bug #2884 Fix "batch filter clobbers array keys when fill parameter is used " (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2884).

Discussion
----------

Fix "batch filter clobbers array keys when fill parameter is used "

closes #2568

Commits
-------

750cb237 fixed batch filter clobbers array keys when fill parameter is used
ede9a604 added preserveKeys support for the batch filter
2019-03-12 11:05:45 +01:00
Fabien Potencier 750cb23742 fixed batch filter clobbers array keys when fill parameter is used 2019-03-12 10:57:52 +01:00
Fabien Potencier ede9a604eb added preserveKeys support for the batch filter 2019-03-12 10:56:31 +01:00
Fabien Potencier 4eeaf763a2 bug #2883 Fix "embed" support when used from "template_from_string" (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix "embed" support when used from "template_from_string"

closes #2761

Commits
-------

92a63e0c fixed "embed" support when used from "template_from_string"
2019-03-12 10:55:06 +01:00
Fabien Potencier 9f23f7c8e2 removed dead code 2019-03-12 10:36:40 +01:00
Fabien Potencier 92a63e0c77 fixed "embed" support when used from "template_from_string" 2019-03-12 09:28:36 +01:00
Fabien Potencier e7976359a9 fixed CS 2019-03-11 21:19:43 +01:00
Fabien Potencier bebc7a9d5b feature #2882 Environment class cleanup 1.x (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2882).

Discussion
----------

Environment class cleanup 1.x

Commits
-------

8ab10798 simplified code
e2103c87 use load() instead of loadTemplate() in tests
c82d7dca added the possibility to pass a TemplateWrapper to Twig\Environment::load()
2019-03-11 19:54:21 +01:00
Fabien Potencier 8ab1079842 simplified code 2019-03-11 19:19:06 +01:00
Fabien Potencier e2103c87ae use load() instead of loadTemplate() in tests 2019-03-11 19:18:00 +01:00
Fabien Potencier c82d7dcaab added the possibility to pass a TemplateWrapper to Twig\Environment::load() 2019-03-11 19:07:45 +01:00
Fabien Potencier eb89971925 minor #2879 Try to avoid guessing template info on errors (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2879).

Discussion
----------

Try to avoid guessing template info on errors

Right now, for syntax errors triggered in a Node, we guess the template line and source, but we then try to set the information in the Parser class. This PR avoids the guessing as it's slow.

Commits
-------

69c0539c removed -2 magic number
2389faea tried to avoid guessing template info on errors
2019-03-11 16:18:06 +01:00
Fabien Potencier 69c0539cc6 removed -2 magic number 2019-03-11 16:11:54 +01:00
Fabien Potencier 2389faeae3 tried to avoid guessing template info on errors 2019-03-11 16:04:11 +01:00