Commit Graph

77 Commits

Author SHA1 Message Date
Fabien Potencier 1d8243b73e Cleanup PHPUnit compatibility 2026-09-05 11:18:32 +02:00
Fabien Potencier 0b6e824ea8 Merge branch '3.x' into 4.x
* 3.x:
  Add void return type hint even in tests
  Run php-cs-fixer sequentially so the void_return src-only customiser is applied
  Fix CHANGELOG
  [Intl] Add format_list filter using PHP 8.5's IntlListFormatter

# Conflicts:
#	.github/workflows/ci.yml
#	CHANGELOG
#	extra/cssinliner-extra/Tests/LegacyFunctionsTest.php
#	extra/html-extra/Tests/CvaTest.php
#	extra/html-extra/Tests/HtmlAttrMergeTest.php
#	extra/html-extra/Tests/HtmlAttrTest.php
#	extra/html-extra/Tests/LegacyFunctionsTest.php
#	extra/inky-extra/Tests/LegacyFunctionsTest.php
#	extra/markdown-extra/Tests/FunctionalTest.php
#	extra/markdown-extra/Tests/LegacyFunctionsTest.php
#	extra/twig-extra-bundle/DependencyInjection/Compiler/MissingExtensionSuggestorPass.php
#	extra/twig-extra-bundle/DependencyInjection/TwigExtraExtension.php
#	extra/twig-extra-bundle/TwigExtraBundle.php
#	src/Extension/CoreExtension.php
#	src/Extension/EscaperExtension.php
#	src/Node/CheckSecurityCallNode.php
#	src/Node/Expression/FunctionExpression.php
#	src/Node/ModuleNode.php
#	src/Node/Node.php
#	src/Node/TypesNode.php
#	src/Resources/core.php
#	src/Resources/debug.php
#	src/Test/IntegrationTestCase.php
#	tests/CustomExtensionTest.php
#	tests/EnvironmentTest.php
#	tests/ExpressionParserTest.php
#	tests/Extension/CoreTest.php
#	tests/Extension/EscaperTest.php
#	tests/Extension/LegacyDebugFunctionsTest.php
#	tests/Extension/LegacyStringLoaderFunctionsTest.php
#	tests/Extension/SandboxStateChangeTest.php
#	tests/Extension/SandboxTest.php
#	tests/LexerTest.php
#	tests/Node/Expression/CallTest.php
#	tests/Node/Expression/ConditionalTest.php
#	tests/Node/NodeTest.php
#	tests/Resources/LegacyCoreTest.php
#	tests/TemplateTest.php
#	tests/Util/CallableArgumentsExtractorTest.php
2026-07-12 13:55:37 +02:00
Fabien Potencier 9c6d76b61c Add void return type hint even in tests 2026-07-12 13:43:08 +02:00
Fabien Potencier ea8aadf94d Merge branch '3.x' into 4.x
* 3.x:
  Exempt test files from the void_return rule regardless of the config location
  fix version in deprecation message for tag usage outside of root template
  Fix array access with a Stringable key on ArrayAccess objects using object keys
  Throw a SyntaxError instead of a PHP fatal error when a macro argument is defined twice
  Bump version
  Prepare the 3.28.0 release
  Render backed enums using their backing value in the html_attr function
  Tweak previous merge
  Add documention note about variable scope of override blocks in {% embed ... only %}
  Define the macro at the template root in the cache macro fixture
  Update CHANGELOG
  Fix a PHP 8.5 chr() deprecation when decoding octal string escapes
  Fix Markup truthiness in boolean expressions

# Conflicts:
#	CHANGELOG
#	doc/deprecated.rst
#	src/Environment.php
#	src/Node/Expression/TempNameExpression.php
#	src/Node/IfNode.php
#	src/Node/MacroNode.php
#	src/NodeVisitor/CorrectnessNodeVisitor.php
#	tests/Fixtures/tags/inheritance/extends_in_condition.test
#	tests/Fixtures/tags/inheritance/use_in_condition.test
#	tests/Fixtures/tags/inheritance/use_in_macro.test
#	tests/Fixtures/tags/macro/macro_in_block.test
#	tests/Fixtures/tags/macro/macro_in_condition.test
2026-07-08 21:22:49 +02:00
Fabien Potencier 424d2f1195 Define the macro at the template root in the cache macro fixture 2026-06-13 12:59:44 +02:00
Fabien Potencier 0facb551b0 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2026-02-07 09:12:05 +01:00
Fabien Potencier 861215c507 Fix CS 2026-02-07 09:07:38 +01:00
Fabien Potencier 9ac4a2dd9c Merge branch '3.x' into 4.x
* 3.x:
  Fix tiny typo in CI workflow label
  Fix typo
  Fix opcache preload warning for unlinked anonymous class
  Bump version
  Prepare the 3.22.2 release
  Add .gitignore & .gitattributes to all .gitattributes
2026-01-07 16:24:12 +01:00
jmsche ff327e4163 Add .gitignore & .gitattributes to all .gitattributes 2025-12-02 15:45:16 +01:00
Fabien Potencier 83f264bcd8 Merge branch '3.x' into 4.x
* 3.x:
  Allow Symfony 8 packages in Twig extra packages
  Fix array typehint for $variants in HtmlExtension
2025-11-02 20:03:33 +01:00
Javier Eguiluz 9a8a1dc1dd Allow Symfony 8 packages in Twig extra packages 2025-11-02 12:00:49 +01:00
Fabien Potencier bd652f3e66 Merge branch '3.x' into 4.x
* 3.x:
  Make `in_array()` calls strict
2025-02-21 19:08:53 +01:00
Alexandre Daubois 9c6b95f2a6 Make in_array() calls strict 2025-02-19 15:29:33 +01:00
Fabien Potencier 69b191f486 Merge branch '3.x' into 4.x
* 3.x:
  Fix cache-extra impl
2025-02-14 11:30:46 +01:00
Fabien Potencier 4695e33f73 Fix cache-extra impl 2025-02-14 11:27:48 +01:00
Fabien Potencier 6032fd320c Merge branch '3.x' into 4.x
* 3.x:
  Fix version
  Fix CS
  Remove obsolete code
  Use generics in ExpressionParsers
  Fix precedence rules
  Add deprecation notices in CHANGELOG and docs
  Move Operators to ExpressionParsers, deprecate ExpressionParser
  Add a script to update operator precedence documentation
  Extract operators logic from ExpressionParser to their own classes
  Introduce operator classes to describe operators provided by extensions instead of arrays
  Bump version to 3.21
2025-02-14 09:08:33 +01:00
Fabien Potencier 251c0b5da9 Fix CS 2025-02-14 08:45:28 +01:00
Fabien Potencier f67078b5c4 Move Operators to ExpressionParsers, deprecate ExpressionParser 2025-02-14 08:38:53 +01:00
Fabien Potencier c142a3268e Merge branch '3.x' into 4.x
* 3.x:
  Fix CHANGELOG
  Fix support for ignoring syntax erros in an undefined handler in guard
  Add missing CHANGELOG
  Fix timezone conversion on strings
  Use correct lineno for ForElseNode
  Add support for registered undefined element callbacks in tests
  Add UnaryInterface
  Add BinaryInterface
  Reimplement the cache tag in an adhoc way
  Fix CS
  Fix wrong array index
  Fix wrong array index
  Bump min PHP version to 8.1
  Add even more tests
  Add some tests on balanced brackets
  Bump version
  Prepare the 3.19.0 release
  Added configuration for commonmark use in twig-extra-bundle.
2025-02-09 18:23:27 +01:00
Fabien Potencier 3288d8d98d Reimplement the cache tag in an adhoc way 2025-02-03 12:49:20 +01:00
Fabien Potencier dc6356268b Bump min PHP version to 8.1 2025-01-31 21:45:36 +01:00
Fabien Potencier 4b91c31887 Merge branch '3.x' into 4.x
* 3.x:
  Deprecate Twig\ExpressionParser::parseOnlyArguments() and Twig\ExpressionParser::parseArguments()
2025-01-24 14:39:08 +01:00
Fabien Potencier 93466404b7 feature #4550 Deprecate Twig\ExpressionParser::parseOnlyArguments() and Twig\ExpressionParser::parseArguments() (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Deprecate Twig\ExpressionParser::parseOnlyArguments() and Twig\ExpressionParser::parseArguments()

Commits
-------

960f6762ed Deprecate Twig\ExpressionParser::parseOnlyArguments() and Twig\ExpressionParser::parseArguments()
2025-01-24 14:36:45 +01:00
Fabien Potencier 28246c5d4e Merge branch '3.x' into 4.x
* 3.x:
  Fixing minor typo in Update inline_css.rst
  Ignore static properties when using the dot operator
  Fix CS
  Fix constant() behavior when used with ??
  Finish the work
  fix indentation
  Apply suggestions from code review
  typo
  fix merge
  docs and changelog
  typehint instead of checkArrow
  checkArrow, typehints
  invoke filter
2025-01-24 11:32:17 +01:00
Fabien Potencier 960f6762ed Deprecate Twig\ExpressionParser::parseOnlyArguments() and Twig\ExpressionParser::parseArguments() 2025-01-23 08:35:56 +01:00
Fabien Potencier 76062c8d51 Fix CS 2025-01-19 16:54:05 +01:00
Alexander M. Turek f2053bbea0 PHPUnit 11 2024-09-04 12:11:51 +02:00
Fabien Potencier a789eca738 Merge branch '3.x' into 4.x
* 3.x:
  Validate the input of CoreExtension::map()
  Rename AbstractTest to ProfilerTestCase
  Make data providers static
  Prepare IntegrationTestCase for static data providers
2024-09-03 22:20:28 +02:00
Alexander M. Turek 18f4203827 Prepare IntegrationTestCase for static data providers 2024-09-03 15:08:40 +02:00
Fabien Potencier 06ac86e3dd Merge branch '3.x' into 4.x
* 3.x:
  Fix tests
  Allow extra extensions to use Twig 4
2024-09-01 23:00:16 +02:00
Fabien Potencier 976cea0403 Fix tests 2024-09-01 22:54:59 +02:00
Fabien Potencier 031c7bda4d Allow extra extensions to use Twig 4 2024-09-01 22:39:12 +02:00
Fabien Potencier e2f0128774 Merge branch '3.x' into 4.x
* 3.x:
  Deprecate the fact that the `extends` and `use` tags are always allowed in a sandboxed template
  Clarify block function
2024-08-28 13:56:42 +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
Fabien Potencier 3f42d4e41f Merge branch '3.x' into 4.x
* 3.x:
  Fix tests
  Deprecate the spaceless filter
2024-08-26 17:43:29 +02:00
Fabien Potencier 2511b658da Fix tests 2024-08-26 17:29:01 +02:00
Fabien Potencier cde9e7dcd4 Use proper node names when they are integers 2024-08-26 09:59:54 +02:00
Fabien Potencier c070cd719c Drop support for 8.0 2024-08-10 12:32:24 +02:00
Fabien Potencier 0131c230c7 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2024-08-07 19:34:39 +02:00
Fabien Potencier f5e10e10f1 Fix CS 2024-08-07 19:34:09 +02:00
Fabien Potencier 35e2645073 Merge branch '3.x' into 4.x
* 3.x:
  Use RawFilter in cache extra
2024-07-28 11:16:41 +02:00
Fabien Potencier 8e72c84c63 Use RawFilter in cache extra 2024-07-28 11:12:39 +02:00
Fabien Potencier 8b47fc319a Use first class callable syntax 2024-07-14 14:01:33 +02:00
Fabien Potencier 67cb9a06fe Merge branch '3.x' into 4.x
* 3.x:
  Update PHPUnit config
  Optimize sprintf() calls for PHP 8.4
2024-06-21 08:27:27 +02:00
Fabien Potencier da4592793b minor #4109 Update PHPUnit config (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Update PHPUnit config

Commits
-------

b78dee86 Update PHPUnit config
2024-06-21 08:25:01 +02:00
Fabien Potencier b78dee8682 Update PHPUnit config 2024-06-21 08:22:31 +02:00
Fabien Potencier b63bde3063 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:16:55 +02:00
Fabien Potencier b80f74af9a Merge branch '3.x' into 4.x
* 3.x:
  Bump version
  Prepare the 3.10.0 release
  Update CHANGELOG
  Fix markup
  Revert "minor #4042 Auto-close PRs on subtree-splits (kbond)"
  Fix typo
2024-05-11 09:45:46 +02:00
Fabien Potencier 761aa56a6f Revert "minor #4042 Auto-close PRs on subtree-splits (kbond)"
This reverts commit 12625c0c05, reversing
changes made to ad934312cd.
2024-05-11 09:35:57 +02:00
Fabien Potencier 318f7b8bb6 Fix typo 2024-05-11 09:09:43 +02:00