Commit Graph

6655 Commits

Author SHA1 Message Date
Fabien Potencier 6967b721ae Add missing dep 2024-08-08 14:51:19 +02:00
Fabien Potencier 102bec30f6 Merge branch '3.x' into 4.x
* 3.x:
  Add the possibility to deprecate attributes and nodes on Node
2024-08-08 14:50:31 +02:00
Fabien Potencier 0d524d3ae7 feature #4182 Add the possibility to deprecate attributes and nodes on Node (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add the possibility to deprecate attributes and nodes on Node

Commits
-------

18894cf9 Add the possibility to deprecate attributes and nodes on Node
2024-08-08 14:48:26 +02:00
Fabien Potencier 18894cf91e Add the possibility to deprecate attributes and nodes on Node 2024-08-08 14:48:20 +02:00
Fabien Potencier fbc1032fd0 Remove versionadded from docs 2024-08-08 14:47:37 +02:00
Fabien Potencier eafbee52e3 Merge branch '3.x' into 4.x
* 3.x:
  Use trigger_deprecation() instead of trigger_error() for deprecations
  Tweak docs
  clarify that macros shadow other macros/functions
2024-08-08 14:47:26 +02:00
Fabien Potencier 90fbb9acbc feature #4183 Add support for package/version on deprecations (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add support for package/version on deprecations

Commits
-------

0ce79df5 Use trigger_deprecation() instead of trigger_error() for deprecations
2024-08-08 14:46:03 +02:00
Fabien Potencier 0ce79df5c4 Use trigger_deprecation() instead of trigger_error() for deprecations 2024-08-08 14:28:28 +02:00
Fabien Potencier 839da16d04 Tweak docs 2024-08-08 11:12:39 +02:00
Fabien Potencier 92525785d8 minor #4181 clarify that macros shadow other macros/functions (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

clarify that macros shadow other macros/functions

see https://github.com/twigphp/Twig/pull/4175#issuecomment-2273646498

Commits
-------

e1a94481 clarify that macros shadow other macros/functions
2024-08-08 10:53:25 +02:00
Christian Flothmann e1a9448190 clarify that macros shadow other macros/functions 2024-08-08 09:25:31 +02:00
Fabien Potencier 81df5161ea Merge branch '3.x' into 4.x
* 3.x:
  Remove debug info
2024-08-07 22:59:29 +02:00
Fabien Potencier 390c5a0b05 Remove debug info 2024-08-07 22:59:17 +02:00
Fabien Potencier 4e6d337f1a Merge branch '3.x' into 4.x
* 3.x:
  Move static attributes for Function|Filter|TestExpression to the constructor
2024-08-07 22:41:08 +02:00
Fabien Potencier 64d5b565d7 feature #4179 Move static attributes for Function|Filter|TestExpression to the constructor (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Move static attributes for Function|Filter|TestExpression to the constructor

Commits
-------

e8141bbd Move static attributes for Function|Filter|TestExpression to the constructor
2024-08-07 22:38:05 +02:00
Fabien Potencier e8141bbd34 Move static attributes for Function|Filter|TestExpression to the constructor 2024-08-07 22:29:43 +02:00
Fabien Potencier a159617f3c Merge branch '3.x' into 4.x
* 3.x:
  Add a recipe about how to mark a node as safe
  Mark ConstantExpression as @final
2024-08-07 21:02:32 +02:00
Fabien Potencier 15854ca9bf feature #4178 Constant expr as final (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Constant expr as final

Closes #4119

Commits
-------

230e31d3 Add a recipe about how to mark a node as safe
693693ba Mark ConstantExpression as `@final`
2024-08-07 21:01:58 +02:00
Fabien Potencier 230e31d384 Add a recipe about how to mark a node as safe 2024-08-07 21:01:18 +02:00
Fabien Potencier a5882760df Fix CS 2024-08-07 19:37:53 +02:00
Fabien Potencier 0131c230c7 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2024-08-07 19:34:39 +02:00
Fabien Potencier f5e10e10f1 Fix CS 2024-08-07 19:34:09 +02:00
Fabien Potencier 693693ba3a Mark ConstantExpression as @final 2024-08-07 19:00:30 +02:00
Fabien Potencier 58e1d86158 Modernize code 2024-08-07 14:44:19 +02:00
Fabien Potencier 2be34fc0ce Merge branch '3.x' into 4.x
* 3.x:
  Introduce ChainCache and ReadOnlyFilesystemCache
  Add a note about how macros can override existing functions
  Fix dumping callables on Node::__toString()
2024-08-07 14:41:48 +02:00
Fabien Potencier ea4d706da1 feature #4171 Introduce ChainCache and ReadOnlyFilesystemCache (Okhoshi)
This PR was merged into the 3.x branch.

Discussion
----------

Introduce ChainCache and ReadOnlyFilesystemCache

Following the feedback in symfony/symfony#54384, I’m proposing the two new Cache implementations in Twig directly.

Commits
-------

0dbe1d9f Introduce ChainCache and ReadOnlyFilesystemCache
2024-08-07 14:41:36 +02:00
Quentin D. 0dbe1d9f6d Introduce ChainCache and ReadOnlyFilesystemCache
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
2024-08-07 14:31:56 +02:00
Fabien Potencier 6566066fab minor #4175 Add a note about how macros can override existing functions (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add a note about how macros can override existing functions

Commits
-------

cea17143 Add a note about how macros can override existing functions
2024-08-07 11:26:22 +02:00
Fabien Potencier cea1714331 Add a note about how macros can override existing functions 2024-08-07 11:25:44 +02:00
Fabien Potencier 26b1dc590c minor #4170 Fix dumping callables on Node::__toString() (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix dumping callables on Node::__toString()

Closes #3694

Commits
-------

fc644721 Fix dumping callables on Node::__toString()
2024-08-04 16:38:14 +02:00
Fabien Potencier fc64472145 Fix dumping callables on Node::__toString() 2024-08-04 16:35:01 +02:00
Fabien Potencier c7d57d1ea3 Modernize code 2024-08-04 13:40:39 +02:00
Fabien Potencier 0707f16cf3 Merge branch '3.x' into 4.x
* 3.x:
  Add new "find" filter
2024-08-04 13:40:16 +02:00
Fabien Potencier fa3c341725 feature #3963 Add new "find" filter (smnandre)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Add new "find" filter

This filter returns the first _value_ matching the given arrow function or null

Attempt to solve #3962

(open to any feedback)

Commits
-------

4e262511 Add new "find" filter
2024-08-04 13:39:13 +02:00
Simon André 4e26251193 Add new "find" filter 2024-08-04 13:39:10 +02:00
Fabien Potencier 01a3831906 Merge branch '3.x' into 4.x
* 3.x:
  Remove the templateClassPrefix property on Environment
2024-07-31 22:49:39 +02:00
Fabien Potencier 205ea9e300 minor #4164 Remove the templateClassPrefix property on Environment (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Remove the templateClassPrefix property on Environment

Commits
-------

215f9880 Remove the templateClassPrefix property on Environment
2024-07-31 22:48:26 +02:00
Fabien Potencier 96b11f74c3 minor #4168 add type-hints to the LoopContext constructor (xabbuh)
This PR was merged into the 4.x branch.

Discussion
----------

add type-hints to the LoopContext constructor

see https://github.com/twigphp/Twig/pull/4153#discussion_r1696308898

Commits
-------

27e137a6 add type-hints to the LoopContext constructor
2024-07-31 22:47:52 +02:00
Fabien Potencier 26b6e19b4d bug #4169 Fix usage of loop in a for else clause (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

Fix usage of loop in a for else clause

Commits
-------

5649de8a Fix usage of loop in a for else clause
2024-07-31 22:47:03 +02:00
Christian Flothmann 27e137a65d add type-hints to the LoopContext constructor 2024-07-31 13:52:09 +02:00
Fabien Potencier 5649de8a14 Fix usage of loop in a for else clause 2024-07-31 11:53:46 +02:00
Fabien Potencier ab0c632f02 Simplify code 2024-07-31 09:35:41 +02:00
Fabien Potencier 7324404f27 Merge branch '3.x' into 4.x
* 3.x:
  Fix various phpstan errors
  Fix EscaperRuntime namespace
2024-07-31 09:34:53 +02:00
Fabien Potencier 0d09230b4b minor #4167 Fix various phpstan errors (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix various phpstan errors

Commits
-------

ae4f2840 Fix various phpstan errors
2024-07-31 09:30:45 +02:00
Fabien Potencier ae4f284043 Fix various phpstan errors 2024-07-30 11:17:22 +02:00
Fabien Potencier b566513ef1 minor #4166 [Tests] Fix EscaperRuntime namespace (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

[Tests] Fix EscaperRuntime namespace

From `Twig\Tests` to `Twig\Tests\Runtime`

Commits
-------

df4e66f4 Fix EscaperRuntime namespace
2024-07-30 09:30:10 +02:00
Simon André df4e66f420 Fix EscaperRuntime namespace
From `Twig\Tests` to `Twig\Tests\Runtime`
2024-07-30 00:36:02 +02:00
Fabien Potencier 215f9880f1 Remove the templateClassPrefix property on Environment 2024-07-28 16:25:21 +02:00
Fabien Potencier 1a83f2c95b Use RawFilter 2024-07-28 11:19:22 +02:00
Fabien Potencier 35e2645073 Merge branch '3.x' into 4.x
* 3.x:
  Use RawFilter in cache extra
2024-07-28 11:16:41 +02:00