Fabien Potencier
c5d0d593d2
minor #4446 Improve YieldReady support docs (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Improve YieldReady support docs
Refs https://github.com/twigphp/Twig/discussions/4428
Commits
-------
9d9c9d81e9 Improve YieldReady support docs
2024-11-12 08:12:30 +01:00
Fabien Potencier
9d9c9d81e9
Improve YieldReady support docs
2024-11-11 09:38:36 +01:00
Fabien Potencier
d4a302681b
Fix sandbox handling for __toString()
2024-11-06 21:35:53 +01:00
Fabien Potencier
89fdc7d31d
Refactor code
2024-10-25 07:47:55 +02:00
Fabien Potencier
1d22d300fa
Revert "feature #4409 Deprecate the range function (fabpot)"
...
This reverts commit 99c6fbd517 , reversing
changes made to 868b429853 .
2024-10-24 15:37:54 +02:00
Fabien Potencier
3d99e595c8
Deprecate the range function
2024-10-24 14:02:46 +02:00
Fabien Potencier
fc15e7ccbc
Rename Node classes related to variables
2024-10-23 12:36:57 +02:00
Fabien Potencier
f1481be00f
Remove MacroAutoImportNodeVisitor
2024-10-21 12:09:30 +02:00
Fabien Potencier
72693884c4
Simplify code
2024-10-21 07:20:17 +02:00
Fabien Potencier
1105964873
Rework macros handling
2024-10-20 21:53:20 +02:00
Fabien Potencier
bde4efac5a
Remove default value for an argument
2024-10-20 11:39:45 +02:00
Fabien Potencier
43b6e098df
Change some type hints to be more precise
2024-09-30 13:47:10 +02:00
Fabien Potencier
8b278986b8
Deprecate using Node directly, introduce EmptyNode and Nodes
2024-09-27 07:42:41 +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
Christian Flothmann
70396d75dc
deprecate passing a tag to ImportNode
2024-08-28 14:40:27 +02:00
Fabien Potencier
5fca700cbd
Deprecate the fact that the extends and use tags are always allowed in a sandboxed template
2024-08-28 13:40:53 +02:00
Fabien Potencier
7121673c9c
Deprecate OptimizerNodeVisitor::OPTIMIZE_TEXT_NODES
2024-08-23 09:22:06 +02:00
Fabien Potencier
3156d8093e
Move FunctionExpression/FilterExpression/TestExpression attributes from compilation time to parsing time
2024-08-14 18:45:35 +02:00
Fabien Potencier
e1b099707c
Micro-micro optimization
2024-08-11 12:56:40 +02:00
Fabien Potencier
84b1b3e0b3
Remove magic handling of the raw filter
2024-07-27 20:37:22 +02:00
Fabien Potencier
0e6d717f2d
Fix optimizer mode validation in OptimizerNodeVisitor
2024-07-27 20:27:31 +02:00
Fabien Potencier
27f6171f2f
Add support for yielding from a generator in PrintNode
2024-07-27 16:57:14 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Fabien Potencier
22810841ba
Move back default strategy to the extension
2024-05-04 08:51:08 +02:00
Fabien Potencier
c2c2058c33
feature #4055 Extract the escaping logic to a runtime (fabpot)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Extract the escaping logic to a runtime
Commits
-------
ead768a4 -
e4a78534 Add missing `@deprecated` tags
d728d1b8 Add more information about migrating away from twig_escape_filter()
70b2e3ca Fix compat with older versions of PHP
84bff064 Extract the escaping logic to a runtime
2024-05-01 09:13:27 +02:00
Fabien Potencier
469d52d1b8
Simplify sandbox code
2024-04-30 13:40:56 +02:00
Fabien Potencier
84bff0643c
Extract the escaping logic to a runtime
2024-04-28 21:26:07 +02:00
Fabien Potencier
41d702d6be
Add a deprecation notice when using AbstractNodeVisitor (deprecated since 2.9)
2024-04-14 10:44:50 +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
2b2ac80d34
Fxi some errors reported by phpstan
2024-02-05 17:48:36 +01:00
Fabien Potencier
c44bd1ff62
Optimize TextNodes
2024-01-10 20:22:00 +01:00
Jérôme Tamarelle
6ca0d773c5
Convert Ternary to Elvis or Null Coalescing
2023-10-20 17:47:17 +02:00
Fabien Potencier
eaf22ba98d
Fix CS
2023-10-20 17:39:50 +02:00
Jérôme Tamarelle
6d715e2002
Remove unused variables and unreachable code
2023-10-08 21:18:06 +02:00
Fabien Potencier
5193653ecb
Fix CS
2023-10-08 09:05:22 +02:00
Fabien Potencier
9e6e700f96
minor #3509 Some code style fixes (dionisvl)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Some code style fixes
Fixes that:
- Type cast is unnecessary
- Unnecessary curly braces syntax for variable
- Operations priority might differ that except
Commits
-------
17c6371f Some code style fixes
2021-05-14 10:26:10 +02:00
Den
17c6371fb5
Some code style fixes
2021-05-14 10:26:05 +02:00
Fabien Potencier
fcbaa669ab
Fix CS
2021-05-12 09:47:40 +02:00
Fabien Potencier
ca3bb5188c
Mark built-in node visitors as @internal
2020-11-30 09:16:20 +01:00
Youssef Benhssaien
d8a4113a74
Remove is_int since typehint exists
2020-11-11 07:27: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
Nicolas Grekas
551a6c1cb8
[3] Fix leftover
2019-09-20 15:26:44 +02:00
Nicolas Grekas
ac0f512553
[3.0] remove the most blocking return types
2019-09-20 15:04:28 +02:00
Fabien Potencier
db41300124
Merge branch '2.x' into 3.x
...
* 2.x:
fixed macro auto-import when a template contains only macros
fixed end of constructor node logic
bumped version to 2.11.3-DEV
prepared the 2.11.2 release
fixed macro auto-import
fix CS
fix CS
bumped version to 2.12
2019-06-08 09:01:50 +02:00
Fabien Potencier
197528f45c
fixed macro auto-import when a template contains only macros
2019-06-06 10:15:08 +02:00
Fabien Potencier
1a3dc0aab0
Merge branch '1.x' into 2.x
...
* 1.x:
fixed end of constructor node logic
2019-06-06 10:08:52 +02:00