Commit Graph

6066 Commits

Author SHA1 Message Date
Fabien Potencier 7e7d5839d4 Prepare the 3.6.1 release v3.6.1 2023-06-08 14:52:13 +02:00
Fabien Potencier 69d58e5705 Update CHANGELOG 2023-06-08 14:51:43 +02:00
Fabien Potencier 833e51ea35 minor #3840 Suppress native return type deprecation msg (PhilETaylor)
This PR was merged into the 3.x branch.

Discussion
----------

Suppress native return type deprecation msg

> Method "Symfony\Component\DependencyInjection\Extension\ExtensionInterface::load()" might add "void" as a native return type declaration in the future. Do the same in implementation "Twig\Extra\TwigExtraBundle\DependencyInjection\TwigExtraExtension" now to avoid errors or add an explicit ``@return`` annotation to suppress this message.

Commits
-------

72d6f205 suppress native return type deprecation msg
2023-05-06 19:15:54 +02:00
Phil E. Taylor 72d6f20556 suppress native return type deprecation msg 2023-05-06 12:11:46 +01:00
Fabien Potencier 3fd3645601 Bump version 2023-05-03 21:08:22 +02:00
Fabien Potencier 106c170d08 Prepare the 3.6.0 release v3.6.0 2023-05-03 21:06:57 +02:00
Fabien Potencier 0911e40675 Update CHANGELOG 2023-05-03 21:06:32 +02:00
Fabien Potencier 125532f572 Merge branch '2.x' into 3.x
* 2.x:
  Prepare the 2.15.5 release
  Update CHANGELOG
2023-05-03 19:50:57 +02:00
Fabien Potencier fc02a6af3e Prepare the 2.15.5 release v2.15.5 2023-05-03 19:49:41 +02:00
Fabien Potencier 17bf0637d9 Update CHANGELOG 2023-05-03 19:49:13 +02:00
Fabien Potencier e2d668551b Merge branch '2.x' into 3.x
* 2.x:
  Making the Lexer initialize itself lazily, to avoid loading the extension set early
2023-05-03 19:47:35 +02:00
Fabien Potencier 72230e28d3 bug #3837 Making the Lexer initialize itself lazily, to avoid loading the extension set early (weaverryan)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Making the Lexer initialize itself lazily, to avoid loading the extension set early

Hi!

Over on Symfony UX, we are pushing Twig in some crazy, "unconventional" ways by overriding the lexer to add a new HTML-like syntax - e.g. `<twig:Alert type="success">` - https://github.com/symfony/ux/blob/2.x/src/TwigComponent/src/Twig/ComponentLexer.php

Normally, the internal `Lexer` is not instantiated until it's needed - i.e. when a template is rendered. However, when overriding the lexer, our `ComponentLexer` needs to be instantiated early and set onto the `Environment`. And since it needs to extend `Lexer`, `Lexer::__construct()` is called much earlier than normal. One line in the constructor - https://github.com/twigphp/Twig/blob/f5ee1b6815a28fbab6e6fbb8c48b7964f0d93dd4/src/Lexer.php#L108 - causes the "extension set" to be loaded inside `Environment`. Some applications rely on being able to set extra Twig extensions after `Environment` is created, but before a template is rendered and our custom lexer currently breaks that.

So, the suggestion is to make the work inside `__construct()` done later. Everything is private, so I believe this is safe.

Cheers!

Commits
-------

2f7e8680 Making the Lexer initialize itself lazily, to avoid loading the extension set early
2023-05-03 19:47:15 +02:00
Ryan Weaver 2f7e868017 Making the Lexer initialize itself lazily, to avoid loading the extension set early 2023-05-03 19:47:11 +02:00
Fabien Potencier f5ee1b6815 minor #3834 Put example all on one line (edent)
This PR was merged into the 3.x branch.

Discussion
----------

Put example all on one line

Fixes #3833

Commits
-------

9bb05aca Put example all on one line
2023-04-25 14:06:28 +02:00
Terence Eden 9bb05acae4 Put example all on one line
Fixes #3833
2023-04-24 22:26:49 +01:00
Fabien Potencier 1812ca1ade bug #3832 return annotation to suppress deprecation warning (PhilETaylor)
This PR was merged into the 3.x branch.

Discussion
----------

return annotation to suppress deprecation warning

(finally PRed in the right repo - sorry about that)

> !!  2023-04-14T10:59:02+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "Twig\Extra\TwigExtraBundle\TwigExtraBundle" now to avoid errors or add an explicit ``@return`` annotation to suppress this message.

Commits
-------

b7a8ebbe return annotation to suppress deprecation warning
2023-04-14 13:18:53 +02:00
Phil E. Taylor b7a8ebbe6f return annotation to suppress deprecation warning 2023-04-14 12:03:02 +01:00
Fabien Potencier 05bb9186ff minor #3831 Adding mb_strlen (ThomasLandauer)
This PR was merged into the 3.x branch.

Discussion
----------

Adding mb_strlen

Commits
-------

19be50ff Adding mb_strlen
2023-04-11 19:38:30 +02:00
Thomas Landauer 19be50ff01 Adding mb_strlen 2023-04-11 12:35:17 +02:00
Fabien Potencier 78c18ad58e minor #3812 Allow psr/container 2.0.2 (tobilektri)
This PR was merged into the 3.x branch.

Discussion
----------

Allow psr/container 2.0.2

Should allow psr/container 2.0.2 - not only 1.1.2

Changes:
https://github.com/php-fig/container/compare/2.0.2...1.1.2

Commits
-------

d140542c Allow psr/container 2.0.2
2023-02-15 10:14:05 +01:00
Tobias Meindl d140542c2e Allow psr/container 2.0.2
Should allow psr/container 2.0.2 - not only 1.1.2

Changes:
https://github.com/php-fig/container/compare/2.0.2...1.1.2
2023-02-15 10:01:39 +01:00
Fabien Potencier 08d2037f26 Bump version to 3.6 2023-02-09 07:45:16 +01:00
Fabien Potencier 77f0eb37ea feature #3808 Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting. (sukei)
This PR was merged into the 3.x branch.

Discussion
----------

Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting.

Since PHP 8.0, IntlDateFormatter get new constants to format relative dates. This PR add those constants.

Commits
-------

5776f760 Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting.
2023-02-09 07:42:43 +01:00
Quentin Schuler 5776f76068 Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting. 2023-02-08 10:10:14 +01:00
Fabien Potencier e172f3c6f4 Bump version 2023-02-08 08:51:03 +01:00
Fabien Potencier 2bd9c96c74 Fix LICENSE year 2023-02-08 08:50:32 +01:00
Fabien Potencier a6e0510cc7 Prepare the 3.5.1 release v3.5.1 2023-02-08 08:49:20 +01:00
Fabien Potencier 0752948cdf Update CHANGELOG 2023-02-08 08:48:35 +01:00
Fabien Potencier 4650d37fb2 Merge branch '2.x' into 3.x
* 2.x:
  Fix LICENSE year
2023-02-08 08:44:55 +01:00
Fabien Potencier 872646a70f Fix LICENSE year 2023-02-08 08:44:48 +01:00
Fabien Potencier 10a7bc13fb bug #3809 Restores the leniency of the matches twig comparison (la5942)
This PR was merged into the 3.x branch.

Discussion
----------

Restores the leniency of the `matches` twig comparison

Restores the leniency of the `matches` twig comparison, allowing null subject to result in a non-match.

Resolves BC break introduced in PR https://github.com/twigphp/Twig/pull/3687 ref in https://github.com/twigphp/Twig/issues/3801#issuecomment-1413345131

As per pattern in https://github.com/twigphp/Twig/pull/3617

Commits
-------

f1366689 Restores the leniency of the `matches` twig comparison, allowing null subject to result in a non-match.
2023-02-08 08:21:13 +01:00
Jacob Richardson f136668933 Restores the leniency of the matches twig comparison, allowing null subject to result in a non-match.
Resolves BC break introduced in PR https://github.com/twigphp/Twig/pull/3687

As per pattern in https://github.com/twigphp/Twig/pull/3617
2023-02-07 17:07:16 +00:00
Fabien Potencier b3bdf6abf6 Merge branch '2.x' into 3.x
* 2.x:
  Minor: Fixing language
2023-02-02 13:25:22 +01:00
Fabien Potencier 2e99376bae minor #3806 Minor: Fixing language (ThomasLandauer)
This PR was submitted for the 3.x branch but it was squashed and merged into the 2.x branch instead.

Discussion
----------

Minor: Fixing language

Commits
-------

f52b45d2 Minor: Fixing language
2023-02-02 13:22:52 +01:00
Thomas Landauer f52b45d226 Minor: Fixing language 2023-02-02 13:22:48 +01:00
Fabien Potencier 609794c376 feature #3803 pass the current key to reduce filter's callback (ju1ius)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

pass the current key to reduce filter's callback

See #3802 for context.

Commits
-------

4f2f3f81 pass the current key to reduce filter's callback
2023-01-25 10:42:46 +01:00
ju1ius 4f2f3f814e pass the current key to reduce filter's callback 2023-01-25 10:42:37 +01:00
Fabien Potencier 0d29e91374 minor #3804 Update docs for filters that use the calendar option (phansys)
This PR was merged into the 3.x branch.

Discussion
----------

Update docs for filters that use the `calendar` option

`IntlExtension` does not accept "Gregorian", just "gregorian" ([ref](https://github.com/twigphp/intl-extra/blob/f5aa1e3fe3286d476ceca5feafd4390564f7cc29/IntlExtension.php#L324)).

Commits
-------

9527f93e Update docs for filters that use the `calendar` option
2023-01-23 11:42:27 +01:00
Javier Spagnoletti 9527f93e75 Update docs for filters that use the calendar option 2023-01-21 14:32:09 -03:00
Fabien Potencier 9a40f4a18a bug #3800 Fix error messages in sandboxed mode for has some and has every (stof)
This PR was merged into the 3.x branch.

Discussion
----------

Fix error messages in sandboxed mode for has some and has every

This has been forgotten when changing the PR to implement operators rather than filters.

Commits
-------

44c46712 Fix error messages in sandboxed mode for has some and has every
2023-01-03 19:07:44 +01:00
Christophe Coevoet 44c46712b8 Fix error messages in sandboxed mode for has some and has every 2023-01-03 18:06:19 +01:00
Fabien Potencier 0cfb6f55e9 Merge branch '2.x' into 3.x
* 2.x:
  Bump LICENSE year
  Bump version
  Prepare the 2.15.4 release
2023-01-01 09:43:26 +01:00
Fabien Potencier eb8bde3c41 Bump LICENSE year 2023-01-01 09:42:51 +01:00
Fabien Potencier 7b4d2a69f3 Tweak docs 2022-12-28 14:50:47 +01:00
Fabien Potencier 1dc69ff852 minor #3795 Fix CHANGELOG (jdreesen)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix CHANGELOG

The title of #3670 is misleading, as the implementation changed from being a filter to an operator.

Also fixed some typos.

Commits
-------

dc693725 Fix CHANGELOG
2022-12-28 14:45:17 +01:00
Jacob Dreesen dc693725ea Fix CHANGELOG 2022-12-28 14:45:14 +01:00
Fabien Potencier 462c9aeddd minor #3797 Add "has some" and "has every" expressions documentation (Jean-Beru)
This PR was merged into the 3.x branch.

Discussion
----------

Add "has some" and "has every" expressions documentation

Add documentation for https://github.com/twigphp/Twig/pull/3670.

Commits
-------

459ed67e Add "has some" and "has every" expressions
2022-12-28 14:43:25 +01:00
hubert.lenoir 459ed67e48 Add "has some" and "has every" expressions 2022-12-28 14:34:31 +01:00
Fabien Potencier 8f8d67b489 Add some missing functions in docs 2022-12-27 13:34:33 +01:00
Fabien Potencier 7d326d512f Bump version 2022-12-27 13:29:16 +01:00