Ruud Kamphuis
7e52a68097
Add more types to Template class and compiled templates
2024-08-30 16:17:55 +02:00
Fabien Potencier
70b912fa10
minor #4228 Use CPP in full code base (andreybolonin)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Use CPP in full code base
Commits
-------
28923f42 Use CPP in full code base
2024-08-29 19:29:42 +02:00
andreybolonin1989@gmail.com
28923f4269
Use CPP in full code base
2024-08-29 19:29:39 +02:00
Ruud Kamphuis
bb8b9c197c
Add return type isTraitable
2024-08-29 10:29:47 +02:00
Nicolas Grekas
5d1a19a80c
Swap BC layer for yield-ready and reclaim perf loss
2024-08-19 17:31:12 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Gildas de Cadoudal
6c6315263e
fix : #4033 add missing unwrap call when a TemplateWrapper instance can be present
2024-04-18 11:47:39 +02:00
Fabien Potencier
dbe9456f77
Fix incompatibility with old PHP versions
2024-04-14 11:16:06 +02:00
Fabien Potencier
61031d6cfa
Deprecate passing a Template instance in Environment::resolveTemplate() and Template::loadTemplate()
2024-04-14 11:15:25 +02:00
Fabien Potencier
30b5658f89
Fix CS
2024-04-14 10:22:11 +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
f7f11ea410
Fix CS
2024-02-10 09:52:03 +01:00
Fabien Potencier
0b9e30e3d2
Simplify code
2023-12-20 20:43:49 +01:00
Drew Richards
85bf01b4ab
Catch errors thrown during template rendering
2023-10-26 17:55:48 -07: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
2dd1d909b9
Fix CS
2021-05-12 09:37:17 +02: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
c83ede7fcd
Merge branch '2.x' into 3.x
...
* 2.x:
Fix CS
Fix CS
2020-06-22 08:17:05 +02:00
Fabien Potencier
c2019904bb
Merge branch '1.x' into 2.x
...
* 1.x:
Fix CS
2020-06-22 08:13:34 +02:00
Fabien Potencier
e99363231b
Fix CS
2020-06-22 08:11:03 +02:00
Matthias Pigulla
30feddef10
Replace strtolower() with strtr() when dealing with method names
2020-01-08 09:27:07 +01:00
Nicolas Grekas
d0550b7a68
Fix using array_key_exists() on objects, it is deprecated in PHP 7.4
2019-08-01 16:18:22 +02:00
Fabien Potencier
17bf2f0bfc
Merge branch '2.x' into 3.x
...
* 2.x:
Don't clear PHP buffer when an error occurs with debug=true
Remove duplicate phpdoc
2019-06-10 19:37:42 +02:00
Fabien Potencier
b957ff6f29
Merge branch '1.x' into 2.x
...
* 1.x:
Don't clear PHP buffer when an error occurs with debug=true
Remove duplicate phpdoc
2019-06-10 19:37:27 +02:00
Grégoire Pineau
c910e71f5a
Don't clear PHP buffer when an error occurs with debug=true
2019-06-10 19:36:53 +02:00
Fabien Potencier
3d1b9a11d8
Merge branch '2.x' into 3.x
...
* 2.x:
fixed CS
added the key to the map and filter filters
added support for iterators
removed fn in front of arrow functions
changed arrow syntax
added "filter", "map", and "reduce" filters
simplified code
fixed CS
bumped version to 2.10
bumped version to 1.41
fixed partial output leak when a PHP fatal error occurs
fixed markup in docs
2019-05-09 13:29:19 +02:00
Fabien Potencier
5c484ce7eb
Merge branch '1.x' into 2.x
...
* 1.x:
added the key to the map and filter filters
added support for iterators
removed fn in front of arrow functions
changed arrow syntax
added "filter", "map", and "reduce" filters
simplified code
fixed CS
fixed partial output leak when a PHP fatal error occurs
2019-05-09 13:25:49 +02:00
Fabien Potencier
6196fe5b40
fixed partial output leak when a PHP fatal error occurs
2019-05-03 08:42:27 +02:00
Fabien Potencier
b3498de45c
made Template::getSourceContext() abstract
2019-04-23 18:39:08 +02:00
Fabien Potencier
802646aa5e
removed Template::__toString()
2019-04-23 18:29:40 +02:00
Fabien Potencier
653dddd1f9
simplified code
2019-04-23 17:22:39 +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
2ff1a3eda2
Merge branch '1.x' into 2.x
...
* 1.x:
fixed import macros from a template string
2019-04-22 18:01:41 +02:00
Fabien Potencier
f0c58854a8
fixed import macros from a template string
2019-04-22 10:15:16 +02:00
Fabien Potencier
1c80fa7205
Merge branch '1.x' into 2.x
...
* 1.x:
added more tests
added missing hints in some runtime exceptions
2019-04-12 12:08:49 +02:00
Fabien Potencier
d4db91535d
added missing hints in some runtime exceptions
2019-04-12 10:29:05 +02:00
Fabien Potencier
22abafb081
fixed CS
2019-04-05 19:09:58 +02:00
Fabien Potencier
c844cdbe64
fixed CS
2019-04-03 16:07:17 +02:00
Fabien Potencier
a73bcb4afe
Merge branch '1.x' into 2.x
...
* 1.x:
fixed batch filter clobbers array keys when fill parameter is used
added preserveKeys support for the batch filter
removed dead code
fixed "embed" support when used from "template_from_string"
fixed CS
2019-03-12 11:07:16 +01:00
Fabien Potencier
92a63e0c77
fixed "embed" support when used from "template_from_string"
2019-03-12 09:28:36 +01:00
Fabien Potencier
2861b40965
Merge branch '1.x' into 2.x
...
* 1.x:
removed -2 magic number
tried to avoid guessing template info on errors
2019-03-11 16:18:55 +01:00
Fabien Potencier
69c0539cc6
removed -2 magic number
2019-03-11 16:11:54 +01: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
29a2e18e14
Merge branch '1.x' into 2.x
...
* 1.x:
fixed some issues
2019-03-06 22:09:35 +01:00
Fabien Potencier
5d79776175
bug #2871 Fix some issues (fabpot)
...
This PR was merged into the 1.x branch.
Discussion
----------
Fix some issues
Commits
-------
c58fa840 fixed some issues
2019-03-06 22:09:17 +01:00
Fabien Potencier
c58fa84054
fixed some issues
2019-03-06 22:08:00 +01:00
Fabien Potencier
8254d07064
removed @internal tag on Twig\Template as the whole class is marked as internal
2019-03-06 18:46:56 +01:00