Commit Graph

66 Commits

Author SHA1 Message Date
Fabien Potencier d27c50850d Merge branch '3.x' into 4.x
* 3.x:
  Add SourcePolicyInterface to selectively enable the Sandbox based on a template's Source
  add docs & links
2023-12-19 08:20:44 +01:00
Fabien Potencier 204cd6f412 Merge branch '2.x' into 3.x
* 2.x:
  Add SourcePolicyInterface to selectively enable the Sandbox based on a template's Source
2023-12-19 08:19:15 +01:00
Yaakov Saxon a18da1614a Add SourcePolicyInterface to selectively enable the Sandbox based on a template's Source 2023-12-19 08:18:35 +01:00
Fabien Potencier f84c2172bf Remove deprecated code 2023-12-10 21:02:11 +01:00
Fabien Potencier 54d34b969b Move functions for CoreExtension 2023-12-10 20:13:10 +01:00
Fabien Potencier 72071e8ece Move functions for EscaperExtension 2023-12-10 11:49:57 +01:00
Fabien Potencier 196e91dd72 Move functions for StringLoaderExtension 2023-12-10 11:38:36 +01:00
Fabien Potencier d4d016034c Move functions for DebugExtension 2023-12-10 11:35:00 +01:00
Fabien Potencier 2f73ee35ca minor #3900 Minor rename of Sandbox test: functions->methods (YSaxon)
This PR was merged into the 3.x branch.

Discussion
----------

Minor rename of Sandbox test: functions->methods

Commits
-------

62732646 Minor rename of SandboxTest functions->methods
2023-11-21 17:18:42 +01:00
Yaakov Saxon 62732646c8 Minor rename of SandboxTest functions->methods 2023-10-27 12:15:56 -04:00
Fabien Potencier 248855b34b Merge branch '2.x' into 3.x
* 2.x:
  Fix premature loop exit in Security Policy lookup of allowed methods/properties
2023-10-26 17:38:13 -07:00
Yaakov Saxon 5e1838dbca Fix premature loop exit in Security Policy lookup of allowed methods/properties 2023-10-26 17:37:13 -07:00
Fabien Potencier 5193653ecb Fix CS 2023-10-08 09:05:22 +02:00
Fabien Potencier d6f9a4e7a2 Merge branch '2.x' into 3.x
* 2.x:
  Fix custom escapers when using multiple Twig environments
  Rename variable
2022-03-25 09:06:57 +01:00
Fabien Potencier 9c03ef0d21 Fix custom escapers when using multiple Twig environments 2022-03-25 08:56:44 +01:00
Fabien Potencier 9e5ca747b6 Merge branch '2.x' into 3.x
* 2.x:
  Disallow non closures in `sort` filter when the sanbox mode is enabled
2022-02-04 07:56:23 +01:00
Fabien Potencier 2eb3308055 Disallow non closures in sort filter when the sanbox mode is enabled 2022-02-04 07:52:21 +01:00
Fabien Potencier 464842c41f Merge branch '2.x' into 3.x
* 2.x:
  Add explicit `@return` type next to `#[ReturnTypeWillChange]`
2021-08-11 09:52:24 +02:00
Nicolas Grekas 1d0bab9d63 Add explicit @return type next to #[ReturnTypeWillChange] 2021-08-10 18:49:26 +02:00
Fabien Potencier d9ac797190 Merge branch '2.x' into 3.x
* 2.x:
  Twig2 PHP 8.1 beta compatibility
2021-07-29 09:09:30 +02:00
Alex Pott 98c2233e47 Twig2 PHP 8.1 beta compatibility 2021-07-28 09:49:43 +01:00
Fabien Potencier 5f20d4a362 Merge branch '2.x' into 3.x
* 2.x:
  Explicitly specify the encoding for mb_ord in JS escaper
2021-07-08 13:01:29 +02:00
Fabien Potencier feeaba3fea Merge branch '1.x' into 2.x
* 1.x:
  Explicitly specify the encoding for mb_ord in JS escaper
2021-07-08 13:01:04 +02:00
Fabien Potencier fcbaa669ab Fix CS 2021-05-12 09:47:40 +02:00
Fabien Potencier 13e360972a Merge branch '2.x' into 3.x
* 2.x:
  Fix CS
  Fix CS
  Migrate to the new PHP CS Fixer config file
  Fixing links
2021-05-12 09:45:40 +02:00
Fabien Potencier 157fa56829 Merge branch '1.x' into 2.x
* 1.x:
  Fix CS
  Migrate to the new PHP CS Fixer config file
2021-05-12 09:27:30 +02:00
Fabien Potencier 59f3e8e5dc Fix CS 2021-05-12 09:19:37 +02:00
Fabien Potencier 1327db55e9 Merge branch '2.x' into 3.x
* 2.x:
  Update format_time.rst
  Fix "include(template_from_string())"
  Fix PHPUnit config
2020-10-27 15:15:09 +01:00
Fabien Potencier 497f027cd4 Merge branch '1.x' into 2.x
* 1.x:
  Fix "include(template_from_string())"
  Fix PHPUnit config
2020-10-27 15:14:55 +01:00
Fabien Potencier df9c9f2165 Fix "include(template_from_string())" 2020-10-27 13:39:31 +01:00
Fabien Potencier 1fb577363d Merge branch '2.x' into 3.x
* 2.x:
  Fix sandbox support when using include(template_from_string())
  Add test to verify that filter is not working when template_from_string is used.
  In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
2020-08-23 17:55:24 +02:00
Fabien Potencier ab6695b580 Merge branch '1.x' into 2.x
* 1.x:
  Fix sandbox support when using include(template_from_string())
  Add test to verify that filter is not working when template_from_string is used.
  In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
2020-08-23 17:55:14 +02:00
Fabien Potencier c7be1bb3c4 Fix sandbox support when using include(template_from_string()) 2020-08-23 17:48:34 +02:00
Bozhidar Hristov 04431228af Add test to verify that filter is not working when template_from_string is used. 2020-08-23 17:46:12 +02:00
Fabien Potencier 7759111e75 Merge branch '2.x' into 3.x
* 2.x:
  Update CHANGELOG
  Update CHANGELOG
  Fix previous merge
  Make round brackets optional for one argument tests like sameas
2020-08-23 14:22:39 +02:00
Fabien Potencier 9bf49d5ccf Merge branch '1.x' into 2.x
* 1.x:
  Update CHANGELOG
  Fix previous merge
  Make round brackets optional for one argument tests like sameas
2020-08-23 14:22:09 +02:00
Andreas 1ee72d9e15 Make round brackets optional for one argument tests like sameas 2020-08-23 14:16:31 +02:00
Fabien Potencier 222d053733 Merge branch '2.x' into 3.x
* 2.x:
  Fix CS
  Fix CS
2020-08-23 13:49:50 +02:00
Fabien Potencier 81612a5c7d Merge branch '1.x' into 2.x
* 1.x:
  Fix CS
2020-08-23 13:49:18 +02:00
Fabien Potencier bde54e11b8 Fix CS 2020-08-23 13:48:32 +02:00
Fabien Potencier 0fdf96c389 Merge branch '2.x' into 3.x
* 2.x:
  Add a test
  Fix typo
  Fix compatibility with PHPUnit 10
  Update doc for macro with embed tags
  fix typo in ApplyTokenParser PHP doc
  Fixes #3351
2020-08-05 16:54:08 +02:00
Fabien Potencier 38bd74d03a Merge branch '1.x' into 2.x
* 1.x:
  Add a test
  fix typo in ApplyTokenParser PHP doc
  Fixes #3351
2020-08-05 16:53:59 +02:00
Bozhidar Hristov 04658c9f59 Fixes #3351 2020-07-09 14:43:36 +02:00
Fabien Potencier 81e0746b95 Merge branch '2.x' into 3.x
* 2.x:
  Restrict callables to closures in filters
  Fix CS
  Update html_to_markdown.rst
2020-07-05 15:32:53 +02:00
Fabien Potencier d190c2e7f7 Merge branch '1.x' into 2.x
* 1.x:
  Restrict callables to closures in filters
2020-07-05 15:32:43 +02:00
Jérémy Derussé d8259519c0 Restrict callables to closures in filters 2020-07-05 15:30:15 +02:00
Guilliam Xavier 9d115f6831 [3.x] Fix twig_compare w.r.t. whitespace trimming 2020-07-05 15:21:52 +02:00
Guilliam Xavier d6822aebcf Fix twig_compare float-string trailing whitespace + refactor 2020-06-08 12:43:14 +02:00
Nicolas Grekas 791f001ae6 Merge branch '1.x' into 2.x
* 1.x:
  Minor fixes
2020-05-21 11:15:20 +02:00
Nicolas Grekas 5dc364469b Minor fixes 2020-05-21 11:01:36 +02:00