Simon André
dc329fd44e
Fix MacroNode $name argument can be overridden
...
Fix #4515
2024-12-26 10:28:13 +01:00
Fabien Potencier
c384fb4d8c
bug #4475 Fix having macro variables starting with an underscore (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Fix having macro variables starting with an underscore
Closes #4452
Commits
-------
bdb0f3c042 Fix having macro variables starting with an underscore
2024-11-26 21:41:33 +01:00
Fabien Potencier
bdb0f3c042
Fix having macro variables starting with an underscore
2024-11-26 16:59:45 +01:00
Fabien Potencier
0176de0fa9
Fix CS
2024-11-26 16:57:59 +01:00
Vincent Langlet
75d48db822
Add phpstan analysis
2024-11-20 20:05:33 +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
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
b86575cfd6
Deprecate Environment::mergeGlobals()
2024-09-07 14:05:02 +02:00
Fabien Potencier
978f749b43
Fix minor things
2024-09-06 12:58:38 +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
41459e0ddb
Fix CS
2024-08-27 13:18:23 +02:00
Fabien Potencier
4b99692e2a
Fix class name
2024-08-24 17:12:56 +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
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Fabien Potencier
d30b72c364
Fix blocks not available under some circumstancies
2024-05-11 08:44:27 +02:00
Fabien Potencier
64cebe0e0b
Fix CaptureNode for some use cases
2024-04-17 04:57:55 -04: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
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
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
157fa56829
Merge branch '1.x' into 2.x
...
* 1.x:
Fix CS
Migrate to the new PHP CS Fixer config file
2021-05-12 09:27:30 +02:00
Fabien Potencier
59f3e8e5dc
Fix CS
2021-05-12 09:19:37 +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
dce7bd9e14
Merge branch '2.x' into 3.x
...
* 2.x:
macros imported "globally" in a template are now available in macros without re-importing them
added more tests
added some tests
2019-05-17 14:16:15 +02:00
Fabien Potencier
e138164015
macros imported "globally" in a template are now available in macros without re-importing them
2019-05-17 13:03:55 +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
54cec4e3b8
added type hints
2019-04-26 12:01:21 +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
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
1dead73882
added some type hints on constructors
2019-03-16 15:26:39 +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
2389faeae3
tried to avoid guessing template info on errors
2019-03-11 16:04:11 +01:00
Fabien Potencier
037ee67224
switched to namespace first, PSR-0 as a fallback
2019-03-05 08:14:45 +01:00
Fabien Potencier
baa70287f5
switched to namespace first, PSR-0 as a fallback
2019-03-04 21:33:40 +01:00
Maxime Steinhausser
2c174e4015
Use class_exists instead of require
2017-06-05 23:42:50 +02:00
Nicolas Grekas
5420a5e3f8
Add the aliases
2017-05-25 08:32:07 +02:00
Nicolas Grekas
71af32b306
Add namespaced aliases
2017-05-24 10:12:32 +02:00