Commit Graph

1423 Commits

Author SHA1 Message Date
Fabien Potencier fae6cfc32f Add more information about the filter and the negative operators 2024-09-28 09:22:47 +02:00
Fabien Potencier a1daf1e551 minor #4357 Update plural.rst: Fixing(?) broken links (ThomasLandauer)
This PR was merged into the 3.x branch.

Discussion
----------

Update plural.rst: Fixing(?) broken links

More important question: Is the filter's name `plural` or `pluralize`??

Commits
-------

cc3a2b7bac Update plural.rst: Fixing(?) broken links
2024-09-27 07:34:31 +02:00
Fabien Potencier d9d8bb0df3 Add support for inline comments 2024-09-27 07:32:09 +02:00
Thomas Landauer cc3a2b7bac Update plural.rst: Fixing(?) broken links
More important question: Is the filter's name `plural` or `pluralize`??
2024-09-27 01:23:50 +02:00
Nicolas Grekas 1ea0452323 Add support for accessing class constants with the dot operator 2024-09-26 18:06:21 +02:00
Fabien Potencier fe3d615aa4 Be more precise about double-escaping 2024-09-26 08:58:21 +02:00
Hugo Alliaume ac88c9ae75 [Doc] Document about html and html_attr strategies
Co-authored-by: Fabien Potencier <fabien@potencier.org>
2024-09-20 20:33:08 +02:00
Fabien Potencier 52ded207d3 Allow Twig callable arguments to use camel or snake names 2024-09-18 19:19:20 +02:00
Christian Flothmann 0d1821b0d3 fix typo 2024-09-16 12:03:13 +02:00
Fabien Potencier 03f695fe95 minor #4308 [Doc] Provide an alternative for the deprecated spaceless filter (javiereguiluz, fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Provide an alternative for the deprecated spaceless filter

When a feature is deprecated, it's recommended to provide an alternative for it (or mention that there's no alternative).

So, let's mention the whitespace control features in the deprecation message of the `spaceless` filter.

Commits
-------

5a94ddc76e Suggest wording
b5d19ee4be [Doc] Provide an alternative for the deprecated spaceless filter
2024-09-14 10:56:32 +02:00
Fabien Potencier 5a94ddc76e Suggest wording 2024-09-14 10:56:07 +02:00
Fabien Potencier 1b9df761b6 feature #4310 Allow to use a dynamic attribute on the . operator via () (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Allow to use a dynamic attribute on the . operator via ()

Closes #3598

As one can think that the `attribute` function has some special power compared to the `.` operator (like using Symfony PropertyAccess), I think it's better to use the `.` operator for dynamic attributes as well.

Using `()` makes it clear that the behavior is the same as the `.` operator (using `()` is similar to the way one can use dynamic mapping names (like in `{ (name): value }`).

Commits
-------

048183eaa6 Add cross-link
8d1af0fc03 Let's no deprecate the attribute function yet
333638e8e6 Allow to use a dynamic attribute on the . operator via ()
2024-09-14 10:41:58 +02:00
Fabien Potencier 45156aab11 minor #4314 Clarify coding standards (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Clarify coding standards

Refs #3545

Commits
-------

1dfdd82cfe Clarify coding standards
2024-09-14 10:29:17 +02:00
Fabien Potencier 048183eaa6 Add cross-link 2024-09-13 14:06:34 +02:00
Fabien Potencier 8d1af0fc03 Let's no deprecate the attribute function yet 2024-09-13 13:56:05 +02:00
Fabien Potencier 9ea43d8b60 minor #4312 Clarify docs for the u filter (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Clarify docs for the u filter

Closes #3299

Commits
-------

7961788224 Clarify docs for the u filter
2024-09-13 13:39:04 +02:00
Fabien Potencier 1dfdd82cfe Clarify coding standards 2024-09-13 08:16:53 +02:00
Fabien Potencier c8bb3b1b69 Fix markup 2024-09-13 08:15:49 +02:00
Fabien Potencier b6e3ad895c Fix markup 2024-09-13 08:14:14 +02:00
Fabien Potencier 7961788224 Clarify docs for the u filter 2024-09-12 23:07:08 +02:00
Fabien Potencier 333638e8e6 Allow to use a dynamic attribute on the . operator via () 2024-09-12 21:44:45 +02:00
Fabien Potencier 08f28fd06c Remove most usage of foo/bar/baz in the docs 2024-09-12 21:40:08 +02:00
Fabien Potencier b1c35cd1fc Tweak docs 2024-09-12 19:19:56 +02:00
Javier Eguiluz b5d19ee4be [Doc] Provide an alternative for the deprecated spaceless filter 2024-09-12 11:42:41 +02:00
Fabien Potencier b2e66717a2 feature #4300 Add support for argument unpacking (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Add support for argument unpacking

Closes #3291

Commits
-------

112de8dcfa Add support for argument unpacking
2024-09-11 16:14:43 +02:00
Rylix c7d9a50727 Fix typo 2024-09-11 14:41:00 +02:00
Fabien Potencier 112de8dcfa Add support for argument unpacking 2024-09-11 11:55:09 +02:00
Fabien Potencier d571e8bc92 feature #4293 Deprecate the sandbox tag (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Deprecate the sandbox tag

Closes #3168

Commits
-------

9369a48c53 Deprecate the sandbox tag
2024-09-10 22:42:18 +02:00
Fabien Potencier 9369a48c53 Deprecate the sandbox tag 2024-09-10 22:41:00 +02:00
Fabien Potencier d1b05519af Clarify docs on registerUndefinedTokenParserCallback() 2024-09-10 08:34:26 +02:00
Fabien Potencier 34ae0311d9 Improve the way one can deprecate a Twig callable 2024-09-09 21:14:40 +02:00
Christian Flothmann f72c93dbd2 fix the version mergeGlobals() is deprecated since 2024-09-09 10:58:08 +02:00
Fabien Potencier ef58791fa4 Add the possibility to reset globals 2024-09-07 16:47:00 +02:00
Fabien Potencier b86575cfd6 Deprecate Environment::mergeGlobals() 2024-09-07 14:05:02 +02:00
Alexander M. Turek 18f4203827 Prepare IntegrationTestCase for static data providers 2024-09-03 15:08:40 +02:00
Alexander M. Turek f555a33caf Migrate NodeTestCase to static data providers 2024-09-03 13:51:42 +02:00
Fabien Potencier a39b6e164c minor #4241 Adjust cycle implementation (smnandre)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Adjust `cycle` implementation

Update code following [#4158](https://github.com/twigphp/Twig/issues/4158)
* return mixed
* trigger when non countable
* type the position argument

Add doc precisions

Commits
-------

7c3c1615 Adjust `cycle` implementation
2024-08-30 20:43:09 +02:00
Simon André 7c3c16154e Adjust cycle implementation 2024-08-30 20:43:06 +02:00
Ruud Kamphuis 7e52a68097 Add more types to Template class and compiled templates 2024-08-30 16:17:55 +02:00
Fabien Potencier 2efb955ab5 Remove unneeded whitespace 2024-08-30 12:41:04 +02:00
Fabien Potencier 08a571753b minor #4253 Document how to iterate over a string (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Document how to iterate over a string

Commits
-------

2f8c6218 Fix doc markup
a68804d6 Add an example on how to iterate over a string
2024-08-30 11:46:47 +02:00
Fabien Potencier 2f8c621898 Fix doc markup 2024-08-30 11:43:48 +02:00
Fabien Potencier a68804d614 Add an example on how to iterate over a string 2024-08-30 11:23:14 +02:00
Jeroen Versteeg 67dabd8182 Add types tag 2024-08-29 19:26:49 +02:00
Christian Flothmann 8663ec242b fix typo 2024-08-28 14:18:47 +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
Ruud Kamphuis 8c3df0c0bc Clarify block function
It actually renders the block again.
2024-08-28 08:20:39 +02:00
Fabien Potencier 9fd4c487e7 Deprecate the spaceless filter 2024-08-26 16:25:20 +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