Fabien Potencier
61aa645a30
Merge branch '3.x' into 4.x
...
* 3.x:
Fix doc markup
Add an example on how to iterate over a string
Remove NodeCaptureInterface from TypesNode
Use CPP in full code base
Add types tag
Bump version
Bump version
Prepare the 3.12.0 release
Fix CS
Add conditional return types to `ensureTraversable`
Add return type `isTraitable`
2024-08-30 12:38:56 +02:00
Jeroen Versteeg
67dabd8182
Add types tag
2024-08-29 19:26:49 +02:00
Fabien Potencier
47d745b7ed
Add back the if condition on for loops
2024-08-28 22:14:47 +02:00
Fabien Potencier
4fa4254a54
Merge branch '3.x' into 4.x
...
* 3.x:
deprecate passing a tag to ImportNode
fix typo
2024-08-28 15:23:30 +02:00
Christian Flothmann
70396d75dc
deprecate passing a tag to ImportNode
2024-08-28 14:40:27 +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
cde9e7dcd4
Use proper node names when they are integers
2024-08-26 09:59:54 +02:00
Fabien Potencier
d1f9097c7b
Merge branch '3.x' into 4.x
...
* 3.x:
Deprecate some internal methods from Parser
Move code from ExtendsTokenParser to Parser
Update Node::__toString() to include the node tag if set
Fix class name
Fix error message
2024-08-26 09:28:17 +02:00
Fabien Potencier
9e6c4a6ac1
Deprecate some internal methods from Parser
2024-08-26 09:24:03 +02:00
Fabien Potencier
cf4727606a
Move code from ExtendsTokenParser to Parser
2024-08-26 07:56:37 +02:00
Simon André
470965fcc2
Add missing return types in 4.0
2024-08-17 23:10:07 +02:00
Fabien Potencier
525461feb1
Fix CS
2024-08-15 20:26:39 +02:00
Fabien Potencier
62cc16f548
Merge branch '3.x' into 4.x
...
* 3.x:
Remove remaining const optimizations
2024-08-15 20:26:12 +02:00
Simon André
c662e0ce27
Remove remaining const optimizations
...
After #4198 some `Token::` const optimization remains.
This PR remove them.. **in case** it was not intended
2024-08-15 19:11:55 +02:00
Fabien Potencier
c3791fe986
Merge branch '3.x' into 4.x
...
* 3.x:
Remove const optimization
2024-08-12 09:43:20 +02:00
Fabien Potencier
cd0ac3cc0a
Remove const optimization
2024-08-12 09:40:52 +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
0ce79df5c4
Use trigger_deprecation() instead of trigger_error() for deprecations
2024-08-08 14:28:28 +02:00
Fabien Potencier
8b47fc319a
Use first class callable syntax
2024-07-14 14:01:33 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Fabien Potencier
2b2ac80d34
Fxi some errors reported by phpstan
2024-02-05 17:48:36 +01:00
Fabien Potencier
af8ec178b6
Remove list() usage in code
2024-01-05 12:46:24 +01:00
Fabien Potencier
5193653ecb
Fix CS
2023-10-08 09:05:22 +02:00
Den
17c6371fb5
Some code style fixes
2021-05-14 10:26:05 +02:00
Fabien Potencier
b95735da2e
Mark built-in token parsers as @internal
2020-11-30 12:04:32 +01:00
Fabien Potencier
0fdf96c389
Merge branch '2.x' into 3.x
...
* 2.x:
Add a test
Fix typo
Fix compatibility with PHPUnit 10
Update doc for macro with embed tags
fix typo in ApplyTokenParser PHP doc
Fixes #3351
2020-08-05 16:54:08 +02:00
Fabien Potencier
38bd74d03a
Merge branch '1.x' into 2.x
...
* 1.x:
Add a test
fix typo in ApplyTokenParser PHP doc
Fixes #3351
2020-08-05 16:53:59 +02:00
Chris Jung
47b5028f46
fix typo in ApplyTokenParser PHP doc
...
Typo
2020-07-21 13:11:49 +02:00
Steve Nebes
a343589583
Updated spaceless deprecation to point to apply tag, as the filter tag is now deprecated too
2019-11-28 15:04:01 +01:00
Nicolas Grekas
ac0f512553
[3.0] remove the most blocking return types
2019-09-20 15:04:28 +02:00
Yonel Ceruto
8cd300f5a5
Add missing template name and line no to some deprecation messages
2019-05-28 08:49:56 -04: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
3c0f3d21b9
Merge branch '2.x' into 3.x
...
* 2.x:
made code more readable
2019-05-16 16:32:02 +02:00
Fabien Potencier
e671f267ce
Merge branch '1.x' into 2.x
...
* 1.x:
made code more readable
2019-05-16 16:31:36 +02:00
Fabien Potencier
06670f3630
made code more readable
2019-05-16 16:30:26 +02:00
Fabien Potencier
50f8df7fc7
Merge branch '2.x' into 3.x
...
* 2.x:
tweaked the error message when using extends in a block/macro
2019-05-16 16:17:01 +02:00
Fabien Potencier
ad1d08a431
Merge branch '1.x' into 2.x
...
* 1.x:
tweaked the error message when using extends in a block/macro
2019-05-16 16:16:50 +02:00
Fabien Potencier
70c1b3a2c2
tweaked the error message when using extends in a block/macro
2019-05-16 16:07:04 +02:00
Fabien Potencier
6e6719605b
Merge branch '2.x' into 3.x
...
* 2.x:
tweaked error messages
fixed wrong error message on "import" and "from"
bumped version to 2.10.1-DEV
prepared the 2.10.0 release
bumped version to 1.41.1-DEV
prepared the 1.41.0 release
Correct Twig_SimpleFilter/Twig_SimpleFunction/Twig_SimpleTest deprecation doc (Revert: moved to namespaced classes by default)
fixed PHP 7.4 support
2019-05-16 11:43:04 +02:00
Fabien Potencier
b5ad4c36cf
Merge branch '1.x' into 2.x
...
* 1.x:
tweaked error messages
fixed wrong error message on "import" and "from"
bumped version to 1.41.1-DEV
prepared the 1.41.0 release
2019-05-16 11:42:35 +02:00
Fabien Potencier
118462c16d
fixed wrong error message on "import" and "from"
2019-05-16 11:17:43 +02:00
Fabien Potencier
dca3f74e49
removed the "if" condition support on the "for" tag
2019-05-14 09:17:47 +02:00
Fabien Potencier
f31fe6add4
Merge branch '2.x' into 3.x
...
* 2.x:
deprecated "if" conditions on "for" tags
updated CHANGELOG
added a test
2019-05-09 17:36:40 +02:00
Fabien Potencier
5d1d90ba53
deprecated "if" conditions on "for" tags
2019-05-09 15:20:13 +02:00
Fabien Potencier
54cec4e3b8
added type hints
2019-04-26 12:01:21 +02:00
Fabien Potencier
090eaf8f20
Merge branch '2.x' into 3.x
...
* 2.x:
added missing items in the CHANGELOG
Add Parser typehint
allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
2019-04-26 11:46:06 +02:00
Fabien Potencier
aada6833ca
Merge branch '1.x' into 2.x
...
* 1.x:
Add Parser typehint
allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
2019-04-26 11:39:30 +02:00
Ruud Kamphuis
9ead7df1c0
Add Parser typehint
2019-04-26 11:36:48 +02:00