Commit Graph

6576 Commits

Author SHA1 Message Date
Fabien Potencier 212c03eb6c Merge branch '3.x' into 4.x
* 3.x:
  Fix optimizer mode validation in OptimizerNodeVisitor
2024-07-27 20:28:15 +02:00
Fabien Potencier 71021834cc bug #4156 Fix optimizer mode validation in OptimizerNodeVisitor (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix optimizer mode validation in OptimizerNodeVisitor

Commits
-------

0e6d717f Fix optimizer mode validation in OptimizerNodeVisitor
2024-07-27 20:27:56 +02:00
Fabien Potencier 0e6d717f2d Fix optimizer mode validation in OptimizerNodeVisitor 2024-07-27 20:27:31 +02:00
Fabien Potencier 03fbac566a Fix test 2024-07-27 17:07:17 +02:00
Fabien Potencier 02ab3a185e Merge branch '3.x' into 4.x
* 3.x:
  Add support for yielding from a generator in PrintNode
2024-07-27 17:01:23 +02:00
Fabien Potencier 1920e284a9 feature #4155 Add support for yielding from a generator in PrintNode (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add support for yielding from a generator in PrintNode

Commits
-------

27f6171f Add support for yielding from a generator in PrintNode
2024-07-27 17:01:03 +02:00
Fabien Potencier 27f6171f2f Add support for yielding from a generator in PrintNode 2024-07-27 16:57:14 +02:00
Fabien Potencier c87931e20d Remove deprecated methods 2024-07-27 15:45:03 +02:00
Fabien Potencier 2050b32446 Merge branch '3.x' into 4.x
* 3.x:
  [Doc] Fix code syntax in deprecated.rst
  Deprecate NameExpression internal methods
2024-07-27 15:44:24 +02:00
Fabien Potencier 3c52cd9814 feature #4148 Deprecate NameExpression internal methods (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

Deprecate NameExpression internal methods

Deprecate two methods from `Twig\Node\Expression\NameExpression`:
* `isSimple()`: did not find any usage in Twig (or even Symfony) repositories
* `isSpecial()`: inlined for better performance ($name is available in the method)

Commits
-------

3531f959 Deprecate NameExpression internal methods
2024-07-27 15:43:19 +02:00
Fabien Potencier af90f88802 minor #4154 [Doc] Fix code syntax in deprecated.rst (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Fix code syntax in deprecated.rst

Add missing backticks

https://twig.symfony.com/doc/3.x/deprecated.html#extensions

<img width="846" alt="Capture d’écran 2024-07-27 à 14 22 26" src="https://github.com/user-attachments/assets/4dfaa859-778e-4a34-86a9-acc2eb9eccb6">

Commits
-------

343fefae [Doc] Fix code syntax in deprecated.rst
2024-07-27 15:41:30 +02:00
Simon André 343fefae10 [Doc] Fix code syntax in deprecated.rst
Add missing backticks
2024-07-27 14:21:54 +02:00
Fabien Potencier 8951b8f73a Remove unneeded PHP version check 2024-07-24 13:08:43 +02:00
Fabien Potencier 6b0f2e78c2 Merge branch '3.x' into 4.x
* 3.x:
  Refactor some tests
2024-07-24 13:03:11 +02:00
Fabien Potencier 51e7e5c405 minor #4151 Refactor some tests (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Refactor some tests

Commits
-------

ebcd5034 Refactor some tests
2024-07-24 12:55:18 +02:00
Fabien Potencier 76dcc75982 Merge branch '3.x' into 4.x
* 3.x:
  Replace template loader mocks by ArrayLoader
  [Doc] Fix javascript code-block
2024-07-24 09:53:24 +02:00
Fabien Potencier ebcd5034ee Refactor some tests 2024-07-24 08:44:11 +02:00
Fabien Potencier a656293915 minor #4150 Replace template loader mocks by ArrayLoader (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Replace template loader mocks by ArrayLoader

Commits
-------

e4e95f5b Replace template loader mocks by ArrayLoader
2024-07-24 08:31:51 +02:00
Fabien Potencier e4e95f5b86 Replace template loader mocks by ArrayLoader 2024-07-24 08:27:23 +02:00
Fabien Potencier 3401ddfc10 minor #4147 [Doc] Fix javascript code-block (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Fix javascript code-block

Fix code-block syntax (double space)

Visible there:

<img width="900" alt="Capture d’écran 2024-07-21 à 21 04 22" src="https://github.com/user-attachments/assets/389d8ec5-7caa-4a5c-b8de-f54040462269">

https://twig.symfony.com/doc/3.x/recipes.html#using-twig-and-angularjs-in-the-same-templates

Commits
-------

b0cd5dc5 [Doc] Fix javascript code-block
2024-07-22 14:39:41 +02:00
Simon André 3531f959d3 Deprecate NameExpression internal methods
Deprecate two methods from NameExpression:
* isSimple(): did not find any usage in Twig (or even Symfony) repositories
* isSpecial(): inlined for better performance ($name is available in the method)
2024-07-22 01:25:30 +02:00
Simon André b0cd5dc5a8 [Doc] Fix javascript code-block
Fix code-block syntax (double space)
2024-07-21 21:05:07 +02:00
Fabien Potencier 445e8a94f1 Remove unneeded chars 2024-07-19 10:59:52 +02:00
Fabien Potencier 0840bf478e Rename an internal env var 2024-07-19 10:57:37 +02:00
Fabien Potencier c593373015 minor #4143 Make some small internal tweaks to loops (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

Make some small internal tweaks to loops

Commits
-------

7f0f313f Make some small internal tweaks to loops
2024-07-18 14:24:21 +02:00
Fabien Potencier 7f0f313f1a Make some small internal tweaks to loops 2024-07-18 08:26:46 +02:00
Fabien Potencier 271b402ab1 minor #4142 Fix doc (norkunas)
This PR was merged into the 4.x branch.

Discussion
----------

Fix doc

Commits
-------

934439ac Fix doc
2024-07-17 15:47:44 +02:00
Tomas 934439ac4e Fix doc 2024-07-17 14:46:39 +03:00
Fabien Potencier 98e67eac9a bug #4141 Fix support for IteratorAggregate and EmptyIterator objects in loops (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

Fix support for IteratorAggregate and EmptyIterator objects in loops

Commits
-------

c93daeee Fix support for IteratorAggregate and EmptyIterator objects in loops
2024-07-16 18:42:50 +02:00
Fabien Potencier c93daeee73 Fix support for IteratorAggregate and EmptyIterator objects in loops 2024-07-16 18:39:04 +02:00
Fabien Potencier 05df869558 minor #4137 User first class callable syntax (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

User first class callable syntax

Commits
-------

8b47fc31 Use first class callable syntax
2024-07-14 14:04:29 +02:00
Fabien Potencier 8b47fc319a Use first class callable syntax 2024-07-14 14:01:33 +02:00
Fabien Potencier fcb36ec18a Merge branch '3.x' into 4.x
* 3.x:
  Add support for first class callables
2024-07-14 13:59:52 +02:00
Fabien Potencier 1377f2da4e feature #4140 Add support for first class callables (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add support for first class callables

Commits
-------

d2eab12e Add support for first class callables
2024-07-14 13:59:09 +02:00
Fabien Potencier d2eab12e70 Add support for first class callables 2024-07-14 13:56:14 +02:00
Fabien Potencier 21cd159ff2 Revert "Make compatible with PHP<8"
This reverts commit bb967b3dd3.
2024-07-14 12:17:49 +02:00
Fabien Potencier 4afc66cc82 Merge branch '3.x' into 4.x
* 3.x:
  Make compatible with PHP<8
  Extract ReflectionCallable to make it reusable
  Make a small optimization
  [Doc] Fix `do` tag label in link
2024-07-14 12:17:41 +02:00
Fabien Potencier 5036ab2a4a minor #4139 Extract ReflectionCallable to make it reusable (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Extract ReflectionCallable to make it reusable

Commits
-------

bb967b3d Make compatible with PHP<8
093f51a8 Extract ReflectionCallable to make it reusable
2024-07-14 12:16:15 +02:00
Fabien Potencier bb967b3dd3 Make compatible with PHP<8 2024-07-14 12:13:12 +02:00
Fabien Potencier 093f51a8b9 Extract ReflectionCallable to make it reusable 2024-07-14 12:06:15 +02:00
Fabien Potencier e7334b588b minor #4138 Make a small optimization (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Make a small optimization

The optimization itself is not significant, but this is the only case where we're not using the array of extensions in the code base. So, let's make things consistent here.

Commits
-------

6f12d008 Make a small optimization
2024-07-14 11:21:16 +02:00
Fabien Potencier 6f12d008be Make a small optimization 2024-07-14 11:04:52 +02:00
Fabien Potencier dc00598e39 feature #4135 Add loop.changed, loop.previous, loop.next, and loop.cycle variables (fabpot)
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

Add `loop.changed`, `loop.previous`, `loop.next`, and `loop.cycle` variables

Commits
-------

55b414c4 Add more precise types
65b4ea43 Add `loop.changed`, `loop.previous`, `loop.next`, and `loop.cycle` variables
2024-07-12 19:18:43 +02:00
Fabien Potencier 55b414c497 Add more precise types 2024-07-12 18:05:50 +02:00
Fabien Potencier 65b4ea4394 Add loop.changed, loop.previous, loop.next, and loop.cycle variables 2024-07-12 11:13:02 +02:00
Fabien Potencier 9499b2c468 feature #4134 Make loop.last always available (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

Make loop.last always available

Commits
-------

2e8de1d1 Make loop.last always available
2024-07-12 10:11:06 +02:00
Fabien Potencier 2e8de1d110 Make loop.last always available 2024-07-11 12:08:50 +02:00
Fabien Potencier aa80f21239 minor #4133 Simplify Loop code (fabpot)
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

Simplify Loop code

Let's compute values as late as possible.

Commits
-------

437ad31d Move some code to LoopContext
0c2a69ce Simplify Loop code
2024-07-11 12:06:17 +02:00
Fabien Potencier 437ad31dfa Move some code to LoopContext 2024-07-11 09:35:26 +02:00
Fabien Potencier 0c2a69ceb3 Simplify Loop code 2024-07-11 08:47:22 +02:00