Commit Graph

24 Commits

Author SHA1 Message Date
Fabien Potencier cc1045e4e4 Merge branch '3.x' into 4.x
* 3.x:
  Replace `return; yield` with `yield from []`
  Fix testExtensionsAreNotInitializedWhenRenderingACompiledTemplate
  Fix MacroTest
2024-09-03 13:55:51 +02:00
Ruud Kamphuis 09a43a9f6f Replace return; yield with yield from []
This has the same effect, but looks less hacky and makes PHPStan happy.
https://phpstan.org/r/df7fcc88-1df8-428e-b675-5dc6965c34d6

Previously this was needed to work properly with output capturing.
2024-09-03 09:55:58 +02:00
Fabien Potencier e2f0128774 Merge branch '3.x' into 4.x
* 3.x:
  Deprecate the fact that the `extends` and `use` tags are always allowed in a sandboxed template
  Clarify block function
2024-08-28 13:56:42 +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 9ce10b3260 Merge branch '3.x' into 4.x
* 3.x:
  Deprecate CallExpression::compileArguments
  Bump version
  Prepare the 3.10.3 release
  Fix parse error in generated code when using CaptureNode
  Bump version
  Prepare the 3.10.2 release
2024-06-18 17:15:24 +02:00
Nicolas Grekas 504252835c Fix parse error in generated code when using CaptureNode 2024-05-16 11:46:35 +02:00
Fabien Potencier 7d54d0a935 Merge branch '3.x' into 4.x
* 3.x:
  Add more tests
  Fix blocks not available under some circumstancies
  Remove double ; in generated code
2024-05-11 09:06:22 +02:00
Fabien Potencier 6da7a95fba bug #4081 Fix blocks not available under some circumstancies (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix blocks not available under some circumstancies

Fix #4079

Commits
-------

55ae2149 Add more tests
d30b72c3 Fix blocks not available under some circumstancies
2024-05-11 09:03:44 +02:00
Fabien Potencier d30b72c364 Fix blocks not available under some circumstancies 2024-05-11 08:44:27 +02:00
Fabien Potencier 799355dc82 Remove double ; in generated code 2024-05-08 11:17:29 +02:00
Fabien Potencier f582a3e381 Fix CS 2024-05-01 16:41:44 +02:00
Fabien Potencier 8bebf01858 Merge branch '3.x' into 4.x
* 3.x:
  -
  Fix capturing output from extensions that still use echo
  Add missing @deprecated tags
  Add more information about migrating away from twig_escape_filter()
  Fix compat with older versions of PHP
  Extract the escaping logic to a runtime
2024-05-01 09:18:31 +02:00
Nicolas Grekas 8c43456ac6 Fix capturing output from extensions that still use echo 2024-04-30 16:48:10 +02:00
Fabien Potencier 9a11ee1c64 Merge branch '3.x' into 4.x
* 3.x:
  Bump version to 3.9.4-DEV
  Fix a warning
  Use ::class everywhere
  Auto-close PRs on subtree-splits
  Bump version
  Prepare the 3.9.3 release
  Update CHANGELOG
  Ensure Lexer:: is always initialized
  fix: #4033 add missing unwrap call when a TemplateWrapper instance can be present
  change extended DI extension class
  fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false
2024-04-24 08:25:00 +02:00
Gildas de Cadoudal f7121a23bc fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false 2024-04-18 09:45:09 +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 ae7e6cc9a3 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
  Remove redundant "$thing instanceof \Countable" check
  Update PHPUnit schema
  fix TwigExtraBundle tests with Symfony 6.0/6.1
2024-02-10 10:03:27 +01:00
Fabien Potencier f7f11ea410 Fix CS 2024-02-10 09:52:03 +01:00
Fabien Potencier 3daafdae98 Fix tests 2024-02-05 16:13:35 +01:00
Fabien Potencier b3eeb41861 Remove obsolete code about non-yield templates 2024-02-05 16:13:35 +01:00
Fabien Potencier 3b6cbf98d8 Remove usage of ob_* functions in favor of yielding 2024-01-25 13:09:52 +01:00
Christian Flothmann 665dce899f rework the CaptureNode implementation 2024-01-01 15:43:59 +01:00
Fabien Potencier 6ebbc30593 Abstract node capture in its own Node 2023-12-30 10:14:36 +01:00