17 Commits

Author SHA1 Message Date
Fabien Potencier 469d52d1b8 Simplify sandbox code 2024-04-30 13:40:56 +02:00
Fabien Potencier 83fe22ab15 Get rid of weird code 2024-04-30 12:37:10 +02:00
Nicolas Grekas e70777405d Add #[YieldReady] to allow extensions to tell when they're ready for yielding 2024-02-15 10:27:26 +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 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
Fabien Potencier 54cec4e3b8 added type hints 2019-04-26 12:01:21 +02:00
Fabien Potencier 273b666a71 removed the obsolete lib/ directory, removed PSR-0 class aliases 2019-04-23 16:34:05 +02:00
Fabien Potencier 0ad866d513 Merge branch '1.x' into 2.x
* 1.x:
  do not check sandbox for __toString if method does not exist on object
  tweaked sandbox generated code
  fixed indentation of the compiled template
2019-03-11 12:07:26 +01:00
Fabien Potencier cbb8f6edc1 tweaked sandbox generated code 2019-03-11 08:53:51 +01:00
Fabien Potencier 037ee67224 switched to namespace first, PSR-0 as a fallback 2019-03-05 08:14:45 +01:00
Fabien Potencier baa70287f5 switched to namespace first, PSR-0 as a fallback 2019-03-04 21:33:40 +01:00
Maxime Steinhausser 2c174e4015 Use class_exists instead of require 2017-06-05 23:42:50 +02:00
Nicolas Grekas 5420a5e3f8 Add the aliases 2017-05-25 08:32:07 +02:00
Nicolas Grekas 71af32b306 Add namespaced aliases 2017-05-24 10:12:32 +02:00