Fabien Potencier
861215c507
Fix CS
2026-02-07 09:07:38 +01:00
Nicolas Grekas
85a4817128
CS fixes
2025-07-29 10:07:07 +02:00
Fabien Potencier
bdb0f3c042
Fix having macro variables starting with an underscore
2024-11-26 16:59:45 +01:00
Ruud Kamphuis
1e7c719e24
Add return type to compiled macro
...
This makes it easier for TwigStan to analyze the return type.
2024-10-24 13:51:09 +02:00
Fabien Potencier
fc15e7ccbc
Rename Node classes related to variables
2024-10-23 12:36:57 +02:00
Fabien Potencier
72693884c4
Simplify code
2024-10-21 07:20:17 +02:00
Fabien Potencier
66658a3c1d
Check reserved names in TempNameExpression
2024-10-14 19:42:47 +02:00
Fabien Potencier
223d36bbae
Add support for named arguments on macro calls and dot operator arguments
2024-10-11 11:31:40 +02:00
Fabien Potencier
8b278986b8
Deprecate using Node directly, introduce EmptyNode and Nodes
2024-09-27 07:42:41 +02:00
Fabien Potencier
b86575cfd6
Deprecate Environment::mergeGlobals()
2024-09-07 14:05:02 +02:00
Fabien Potencier
dd9af8ec25
feature #4265 Migrate NodeTestCase to static data providers (derrabus)
...
This PR was merged into the 3.x branch.
Discussion
----------
Migrate NodeTestCase to static data providers
PHPUnit 11 requires data providers to be static. This PR prepares our abstract `NodeTestCase` by deprecating the non-static `getTests()` and adding a static `provideTests()` as a replacement. I've also added PHPUnit attributes which newer PHPUnit releases prefer over PHPDoc annotations.
Commits
-------
f555a33c Migrate NodeTestCase to static data providers
2024-09-03 14:03:04 +02:00
Alexander M. Turek
f555a33caf
Migrate NodeTestCase to static data providers
2024-09-03 13:51:42 +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
Alexander M. Turek
1e5dea44f9
Fix MacroTest
2024-09-02 18:57:57 +02:00
Fabien Potencier
51e93aa130
Deprecate not passing a BodyNode instance as the body of a ModuleNode constructor
2024-08-24 10:49:53 +02:00
Nicolas Grekas
8c43456ac6
Fix capturing output from extensions that still use echo
2024-04-30 16:48:10 +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
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
a9c7307b5c
Tweak code
2024-01-25 13:09:58 +01:00
Fabien Potencier
15879406c8
Remove the new yield nodes
2024-01-25 13:09:58 +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
Fabien Potencier
6823b64cad
moved test under tests/
2019-06-30 14:56:12 +02:00