Commit Graph

6314 Commits

Author SHA1 Message Date
Fabien Potencier 775a445e37 minor #4059 Get rid of weird code (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Get rid of weird code

Commits
-------

83fe22ab Get rid of weird code
2024-04-30 13:10:17 +02:00
Fabien Potencier 83fe22ab15 Get rid of weird code 2024-04-30 12:37:10 +02:00
Fabien Potencier 68a826cf61 minor #3969 [html-extra] filter classes (kbond)
This PR was merged into the 3.x branch.

Discussion
----------

[html-extra] filter classes

A small formatting change to avoid double spaces:

```twig
class="{{ html_classes('a', false ? 'b', true ? 'c') }}"

{# before #}
class="a  c"

{# after #}
class="a c"
```

Commits
-------

a517c14f [html-extra] filter classes
2024-04-29 21:43:39 +02:00
Kevin Bond a517c14f19 [html-extra] filter classes 2024-04-29 21:42:05 +02:00
Fabien Potencier 1ee72a838f minor #4054 Fix some inconsistencies (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix some inconsistencies

Commits
-------

5148d105 Fix some inconsistencies
2024-04-28 13:16:42 +02:00
Fabien Potencier 5148d10515 Fix some inconsistencies 2024-04-28 13:15:26 +02:00
Fabien Potencier e8df2b7217 Tweak docs about operators 2024-04-28 10:58:29 +02:00
Fabien Potencier 8766c2cec7 minor #4004 [Doc] Correct Order & Explanation on precedence (lacpandore)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

[Doc] Correct Order & Explanation on precedence

Following this [issue](https://github.com/twigphp/Twig/issues/3714), i worked on it trying to make it simple and easy to understand

Indeed order of the precedence was not good for ``b-and``, ``b-xor`` and  ``b-and``.
Code [here ](https://github.com/twigphp/Twig/blob/3.x/src/Extension/CoreExtension.php#L280) to understand. I also added additional explanations.

Commits
-------

01e0b7ce [Doc] Correct Order & Explanation on precedence
2024-04-28 10:41:32 +02:00
lacpandore 01e0b7ce42 [Doc] Correct Order & Explanation on precedence 2024-04-28 10:41:28 +02:00
Fabien Potencier f67ad6c8a4 minor #4053 Respect coding standard in documentation (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Respect coding standard in documentation

From https://twig.symfony.com/doc/3.x/coding_standards.html

```
Put exactly one space after the : sign in hashes and , in arrays and hashes:
{{ [1, 2, 3] }}
{{ {'foo': 'bar'} }}
```

Commits
-------

609620e8 Respect coding standard in documentation
2024-04-27 22:01:37 +02:00
Vincent Langlet 609620e83e Respect coding standard in documentation 2024-04-27 21:31:11 +02:00
Fabien Potencier 57a9cdb8fd bug #4050 synchronize sourceContext (Lumaraf)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

synchronize sourceContext

I have some debugging extensions that need the template name from various nodes in a `NodeVisitor`. Currently this is guaranteed for the nodes created from parsing the template. This ensures that the `SourceContext` is also set for nodes created by `NodeVisitors` modifying the node tree.

I am not sure if it is a good idea to always set the `SourceContext` on a child node or if this should only set it if it is not set.

Commits
-------

350670a3 synchronize sourceContext
2024-04-27 10:45:44 +02:00
Daniel Penning 350670a321 synchronize sourceContext 2024-04-27 10:45:41 +02:00
Fabien Potencier 4a7de4ab56 Bump version to 3.9.4-DEV 2024-04-24 08:21:14 +02:00
Fabien Potencier 24b73b8f0f bug #4049 Fix a warning (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix a warning

Closes #4048

Commits
-------

ccc20cbd Fix a warning
2024-04-24 08:20:37 +02:00
Fabien Potencier ccc20cbd1b Fix a warning 2024-04-24 08:06:10 +02:00
Fabien Potencier 861c76cb00 minor #4043 Use ::class everywhere (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Use ::class everywhere

Commits
-------

a71ae192 Use ::class everywhere
2024-04-19 10:51:07 -04:00
Fabien Potencier a71ae1923e Use ::class everywhere 2024-04-19 10:26:00 -04:00
Nicolas Grekas 12625c0c05 minor #4042 Auto-close PRs on subtree-splits (kbond)
This PR was merged into the 3.x branch.

Discussion
----------

Auto-close PRs on subtree-splits

Same as https://github.com/symfony/symfony/pull/54653

Commits
-------

b212f1bb Auto-close PRs on subtree-splits
2024-04-19 08:34:32 +02:00
Kevin Bond b212f1bb2f Auto-close PRs on subtree-splits 2024-04-19 08:34:22 +02:00
Fabien Potencier ad934312cd Bump version 2024-04-18 08:00:19 -04:00
Fabien Potencier a842d75fed Prepare the 3.9.3 release v3.9.3 2024-04-18 07:59:33 -04:00
Fabien Potencier cb307d7fea Update CHANGELOG 2024-04-18 07:59:01 -04:00
Fabien Potencier 117b502411 bug #4037 fix: #4033 add missing unwrap call on TemplateWrapper instance (TLG-Gildas)
This PR was merged into the 3.x branch.

Discussion
----------

fix: #4033 add missing unwrap call on TemplateWrapper instance

Commits
-------

6c631526 fix: #4033 add missing unwrap call when a TemplateWrapper instance can be present
2024-04-18 07:51:18 -04:00
Fabien Potencier 89d6acfe31 bug #4038 Ensure Lexer:: is always initialized (danut007ro)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Ensure Lexer:: is always initialized

I'm using Symfony Bridge `LintCommand` with `--show-deprecations` flag.

While Twig is initializing, if an deprecation error is thrown by `Lexer::getOperatorRegex()` method, the `Lexer::$regexes` will remain `null` but `$isInitialized` will be set to TRUE.

This PR ensures that `$regexes` will be initialized.

Commits
-------

5a79652e Ensure Lexer:: is always initialized
2024-04-18 07:49:48 -04:00
Daniel Gorgan 5a79652e7c Ensure Lexer:: is always initialized 2024-04-18 07:49:46 -04:00
Fabien Potencier 15f596635d bug #4036 change extended DI extension class (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

change extended DI extension class

Commits
-------

b61a4224 change extended DI extension class
2024-04-18 07:36:11 -04:00
Fabien Potencier be6dbbc102 bug #4035 fix: #4029 CaptureNode iterator_to_array preserveKeys false (TLG-Gildas)
This PR was merged into the 3.x branch.

Discussion
----------

fix: #4029 CaptureNode iterator_to_array preserveKeys false

Commits
-------

f7121a23 fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false
2024-04-18 07:32:31 -04:00
Gildas de Cadoudal 6c6315263e fix: #4033 add missing unwrap call when a TemplateWrapper instance can be present 2024-04-18 11:47:39 +02:00
Christian Flothmann b61a422493 change extended DI extension class 2024-04-18 11:24:21 +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
Fabien Potencier 7d2b814e6c bug #4032 Add twig_escape_filter_is_safe() as deprecated. (brummbar)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Add twig_escape_filter_is_safe() as deprecated.

Fix for #4031

Commits
-------

1170144f Add twig_escape_filter_is_safe() as deprecated.
2024-04-17 15:26:51 -04:00
Francesco Sardara 1170144f66 Add twig_escape_filter_is_safe() as deprecated. 2024-04-17 15:26:49 -04:00
Fabien Potencier c145871023 Bump version 2024-04-17 10:17:23 -04:00
Fabien Potencier 856cb5a6cf Prepare the 3.9.2 release v3.9.2 2024-04-17 10:16:25 -04:00
Fabien Potencier 58ae42d940 bug #4028 Fix usage of display_end hook (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix usage of display_end hook

Commits
-------

3ca9685f Fix usage of display_end hook
2024-04-17 10:12:04 -04:00
Fabien Potencier 3ca9685f58 Fix usage of display_end hook 2024-04-17 08:50:57 -04:00
Fabien Potencier 2d169bdca2 bug #4027 Require correct twig core version (Benedikt-Brunner)
This PR was merged into the 3.x branch.

Discussion
----------

Require correct twig core version

This changes the composer version constraint of the internationalisation extension on the core twig library, to require atleast version 3.9.0. This is necessary since twig/intl-extra now depends on CoreExtension::dateConverter() which was only introduced with the release of version 3.9 (see: twigphp/Twig@54d34b9).

Commits
-------

5d903b63 Require correct twig core version
2024-04-17 08:45:04 -04:00
benedikt brunner 5d903b6325 Require correct twig core version 2024-04-17 12:41:53 +00:00
Fabien Potencier 0b4269e6c1 Bump version 2024-04-17 05:00:49 -04:00
Fabien Potencier 664647f46b Prepare the 3.9.1 release v3.9.1 2024-04-17 05:00:00 -04:00
Fabien Potencier 5bad94781a bug #4023 Fix CaptureNode for some use cases (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix CaptureNode for some use cases

Closes #4022

Commits
-------

64cebe0e Fix CaptureNode for some use cases
2024-04-17 04:58:19 -04:00
Fabien Potencier 64cebe0e0b Fix CaptureNode for some use cases 2024-04-17 04:57:55 -04:00
Fabien Potencier 2105d65957 Bump version 2024-04-16 12:05:55 -04:00
Fabien Potencier 47857eebb1 Prepare the 3.9.0 release v3.9.0 2024-04-16 12:04:21 -04:00
Fabien Potencier e58b2feda2 Update CHANGELOG 2024-04-16 12:04:02 -04:00
Fabien Potencier 8150b6819e feature #4011 Add PHP 8.4 support (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Add PHP 8.4 support

Commits
-------

fdfc5ddd Fix compat with PHP 8.4
11511e18 Add PHP 8.4 to CI
2024-04-16 11:47:32 -04:00
Fabien Potencier fdfc5dddb6 Fix compat with PHP 8.4 2024-04-16 11:43:55 -04:00
Fabien Potencier 11511e181d Add PHP 8.4 to CI 2024-04-14 12:38:37 +02:00
Fabien Potencier 6091e7d60c Remove usage of array() in fixtures 2024-04-14 12:38:19 +02:00