Commit Graph

1331 Commits

Author SHA1 Message Date
Fabien Potencier b6360fbae3 minor #4117 [Doc] Replace http links with https (smnandre)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

[Doc] Replace http links with https

Commits
-------

ae429bd5 [Doc] Replace http links with https
2024-07-02 08:10:01 +02:00
Simon André ae429bd51d [Doc] Replace http links with https 2024-07-02 08:09:58 +02:00
Simon André 491a84175d Document OPTIMIZE_TEXT_NODES
(and remove obselete OPTIMIZE_VAR_ACCESS)
2024-06-30 10:13:10 +02:00
Pierre c5c95a2d5c Issue #3828: Add sequence and mapping tests 2024-06-22 19:48:59 +02:00
Fabien Potencier 3080da32c5 feature #4106 Rename hash to mapping and array to sequence (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Rename hash to mapping and array to sequence

Commits
-------

bc19f2f4 Tweak
c44be99a Rename array to sequence
5157402a Rename hash to mapping
2024-06-22 19:40:59 +02:00
Fabien Potencier f24929a4c9 Fix typo 2024-06-22 19:38:57 +02:00
Fabien Potencier bc19f2f48e Tweak 2024-06-22 19:37:52 +02:00
Fabien Potencier c44be99a84 Rename array to sequence 2024-06-22 19:37:51 +02:00
Fabien Potencier 5157402a77 Rename hash to mapping 2024-06-22 19:36:24 +02:00
Fabien Potencier b63bde3063 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:16:55 +02:00
Fabien Potencier 71d6c82de6 Deprecate CallExpression::compileArguments 2024-06-18 17:13:26 +02:00
Fabien Potencier 04b1ad3ced Fix old escaper signature + add docs 2024-05-13 18:21:17 +02:00
Fabien Potencier 6950b2e1d8 Fix markup 2024-05-11 09:37:03 +02:00
Fabien Potencier 22810841ba Move back default strategy to the extension 2024-05-04 08:51:08 +02:00
Fabien Potencier c63f695e8a Add needs_charset option for filters and functions 2024-05-01 13:12:48 +02:00
Fabien Potencier ead768a495 - 2024-05-01 09:11:02 +02:00
Fabien Potencier d728d1b8a6 Add more information about migrating away from twig_escape_filter() 2024-04-29 08:30:49 +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
Vincent Langlet 609620e83e Respect coding standard in documentation 2024-04-27 21:31:11 +02:00
Fabien Potencier 6f3d173f64 Fix markup 2024-04-14 12:32:42 +02:00
Fabien Potencier dbe9456f77 Fix incompatibility with old PHP versions 2024-04-14 11:16:06 +02:00
Fabien Potencier 41d702d6be Add a deprecation notice when using AbstractNodeVisitor (deprecated since 2.9) 2024-04-14 10:44:50 +02:00
Fabien Potencier fe2bdd2b66 Fix doc markup 2024-04-14 10:44:37 +02:00
Thomas Landauer 97df38b39d Update coding_standards.rst: "one (and only one)" => "exactly one"
Page: https://twig.symfony.com/doc/3.x/coding_standards.html
2024-04-13 10:44:08 +02:00
Fabien Potencier b6ae45c3d9 Add a reference to the Twig CS fixer tool 2024-04-13 09:36:08 +02:00
Fabien Potencier 1ed424d565 Clarify the behavior when a property/method does not exist 2024-01-24 07:16:36 +01:00
Louis-Arnaud dd24d5bfd2 add docs & links 2023-12-14 08:17:06 +01:00
Fabien Potencier 16abb69d12 Deprecate internal extension functions in favor of methods on the extension classes 2023-12-09 18:11:17 +01:00
Fabien Potencier d602a55603 Tweak deprecated docs 2023-12-09 17:48:07 +01:00
Fabien Potencier 9f42a76306 minor #3835 Removed duplicate sentence in macro scoping (virtualize)
This PR was merged into the 3.x branch.

Discussion
----------

Removed duplicate sentence in macro scoping

Commits
-------

73f5cad8 Remove duplicate sentence in macro scoping
2023-10-26 17:56:31 -07:00
Fabien Potencier 6f62291c14 Add missing docs 2023-10-20 17:48:30 +02:00
Fabien Potencier fd3f179718 Rewrite an example 2023-10-20 17:35:29 +02:00
devojifr 5349650781 range example leads to Array to string conversion exception
In templates documentation, a range example is displayed and leads to an Array to string conversion exception without a join filter.
2023-10-14 11:22:02 +02:00
Mikhail Gunin 81799a7461 Add Twiggy extension for VS Code to docs. 2023-10-11 16:09:47 +03:00
Fabien Potencier fea9dfc028 Merge branch '2.x' into 3.x
* 2.x:
  Reorganize some information
  Add `Twig Language Server` and `Modern Twig` extension to docs
2023-08-02 10:55:38 +02:00
Fabien Potencier ef655c4d6e Reorganize some information 2023-08-02 10:55:33 +02:00
Stanislav Romanov a949600c4b Add Twig Language Server and Modern Twig extension to docs 2023-08-02 10:53:41 +02:00
Fabien Potencier 09177a7006 feature #3839 Adding support for the ...spread operator on arrays and hashes (weaverryan)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Adding support for the ...spread operator on arrays and hashes

Hi!

Long time user, first time contributor of a real future. I hope I didn't miss anything - but this seemed quite straightforward in the end.

Notes:
* In PHP 7.3 or lower, using the spread operator will result in a Twig syntax error.
* In 8.0 or lower, using the spread operator on a hash will result in a Twig syntax error.

fabbot failures are unrelated, so I'm not touching them.

Cheers!

Commits
-------

ba4fe3ba Adding support for the ...spread operator on arrays and hashes
2023-07-20 16:08:59 +02:00
Ryan Weaver ba4fe3ba34 Adding support for the ...spread operator on arrays and hashes 2023-07-20 16:08:57 +02:00
Robin Martijn 0170dc3cd7 add extra example to slice filter 2023-06-28 14:29:30 +02:00
Fabien Potencier 2fa539bfe7 Merge branch '2.x' into 3.x
* 2.x:
  Mention where named arguments are supported
  Bump version
2023-06-12 08:17:02 +02:00
Matthias Pigulla ef9d785518 Mention where named arguments are supported 2023-06-09 11:18:52 +00:00
Christoph Wieseke 73f5cad8fb Remove duplicate sentence in macro scoping 2023-04-28 13:40:11 +02:00
Terence Eden 9bb05acae4 Put example all on one line
Fixes #3833
2023-04-24 22:26:49 +01:00
Thomas Landauer 19be50ff01 Adding mb_strlen 2023-04-11 12:35:17 +02: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 b3bdf6abf6 Merge branch '2.x' into 3.x
* 2.x:
  Minor: Fixing language
2023-02-02 13:25:22 +01:00