Commit Graph

6448 Commits

Author SHA1 Message Date
Fabien Potencier 76becd4246 minor #4162 Simplify usage of RawFilter (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Simplify usage of RawFilter

Commits
-------

6e55b5f9 Simplify usage of RawFilter
2024-07-28 11:11:17 +02:00
Fabien Potencier 6e55b5f956 Simplify usage of RawFilter 2024-07-28 11:10:04 +02:00
Fabien Potencier 67c7967de2 bug #4161 Fix raw filter compat (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix raw filter compat

Commits
-------

a1789129 Fix raw filter compat
2024-07-28 10:57:43 +02:00
Fabien Potencier a17891292c Fix raw filter compat 2024-07-28 10:51:52 +02:00
Fabien Potencier de7767814b Remove deprecate feature in docs 2024-07-28 10:14:39 +02:00
Fabien Potencier 05475bf843 minor #4157 Remove magic handling of the raw filter (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Remove magic handling of the raw filter

Commits
-------

84b1b3e0 Remove magic handling of the raw filter
2024-07-28 10:10:22 +02:00
Fabien Potencier 84b1b3e0b3 Remove magic handling of the raw filter 2024-07-27 20:37:22 +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 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 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 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 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 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 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 6b6aca5206 minor #4132 [Doc] Fix do tag label in link (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Fix `do` tag label in link

Commits
-------

10deb732 [Doc] Fix `do` tag label in link
2024-07-10 07:46:18 +02:00
Simon André 10deb7328c [Doc] Fix do tag label in link 2024-07-10 00:23:00 +02:00
Fabien Potencier 03fa665cd5 minor #4130 Add more tests (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add more tests

Commits
-------

133cbb77 Add more tests
2024-07-09 10:23:57 +02:00
Fabien Potencier 133cbb7753 Add more tests 2024-07-09 10:19:44 +02:00
Fabien Potencier 13b9afae96 minor #4128 Fix markup in docs (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix markup in docs

Commits
-------

1c6f44e0 Fix markup
2024-07-09 09:13:53 +02:00
Fabien Potencier 1c6f44e095 Fix markup 2024-07-08 14:32:51 +02:00
Fabien Potencier 1ac1645d52 minor #4126 fix grammar for article (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

fix grammar for article

Commits
-------

d54d8438 fix grammar for article
2024-07-08 08:53:43 +02:00
Christian Flothmann d54d8438a5 fix grammar for article 2024-07-07 23:44:32 +02:00
Fabien Potencier 27fcfe0cfa minor #4125 [Doc] Add missing Token types (smnandre)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Add missing Token types

* Token::ARROW_TYPE
* Token::SPREAD_TYPE

Commits
-------

17f7ee34 [Doc] Add missing Token types
2024-07-07 21:36:08 +02:00
Simon André 17f7ee34df [Doc] Add missing Token types
* Document Token::OPERATOR_TYPE
* Token::SPREAD_TYPE
2024-07-07 13:04:07 +02:00
Fabien Potencier edf489831b minor #4121 fix the set of installed packages for TwigExtraBundle on PHP 8.0 (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

fix the set of installed packages for TwigExtraBundle on PHP 8.0

Prevents symfony/translation-contracts 3 to be installed together with symfony/string 5.4.0-RC1 (see https://github.com/twigphp/Twig/actions/runs/9804849131/job/27073398023#step:8:117). Stable releases of the String component don't suffer from this incompatibility because of symfony/symfony#44246.

Commits
-------

c79c7e7a fix the set of installed packages for TwigExtraBundle on PHP 8.0
2024-07-06 10:45:09 +02:00
Fabien Potencier f9a102b79c minor #4122 fix condition for running use_yield test with extra packages (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

fix condition for running use_yield test with extra packages

Commits
-------

07967dea fix condition for running use_yield test with extra packages
2024-07-06 09:38:24 +02:00
Fabien Potencier 96757908f8 minor #4120 simplify an iterable check (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

simplify an iterable check

Commits
-------

8602b7f3 simplify an iterable check
2024-07-06 09:33:23 +02:00
Christian Flothmann 07967dea80 fix condition for running use_yield test with extra packages 2024-07-05 23:56:22 +02:00
Christian Flothmann c79c7e7a09 fix the set of installed packages for TwigExtraBundle on PHP 8.0 2024-07-05 23:50:30 +02:00
Christian Flothmann 8602b7f3dc simplify an iterable check 2024-07-05 23:09:31 +02:00
Fabien Potencier 3c7514ef86 feature #3966 [templates] add shuffle filter (Sarah-eit, fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

[templates] add shuffle filter

New feature :

The filter displays the values in an array at random.
I'm open of any feedback.

Commits
-------

2dacaadd Tweak code, tests, and docs for shuffle
17430ae5 Add shuffle filter
2024-07-05 09:41:23 +02:00
Fabien Potencier f21cb5a6c2 Fixed typo 2024-07-05 09:40:27 +02:00
Fabien Potencier 2dacaadd98 Tweak code, tests, and docs for shuffle 2024-07-05 09:39:44 +02:00
sarah-eit 17430ae5ac Add shuffle filter 2024-07-05 09:20:37 +02:00
Fabien Potencier b37417972c Add missing reference in docs 2024-07-05 08:05:05 +02:00
Fabien Potencier 82d31319bb Fix tests 2024-07-05 07:59:36 +02:00