Commit Graph

96 Commits

Author SHA1 Message Date
Fabien Potencier 768f851237 Remove obsolete PHPUnit Bridge environment variable 2026-08-29 09:41:11 +02:00
Fabien Potencier 60d3b3452a Merge branch '3.x' into 4.x
* 3.x:
  Add support for tempest/markdown in markdown-extra
  Add the include_only function to render a template without access to the current context
  Clarify duplicate macro deprecation message
  Deduplicate template error handling

# Conflicts:
#	.gitignore
#	CHANGELOG
#	extra/markdown-extra/composer.json
#	src/Extension/CoreExtension.php
#	src/Parser.php
#	src/Template.php
#	tests/Fixtures/macros/duplicate_definition.legacy.test
2026-08-16 10:57:50 +02:00
Romain Monteil aa17f59877 Add support for tempest/markdown in markdown-extra 2026-08-12 13:02:21 +02:00
Fabien Potencier 075dd703d0 Merge branch '3.x' into 4.x
* 3.x:
  Disable the fabbot test-case return type check
2026-07-12 15:39:22 +02:00
Fabien Potencier 27a2dba4a7 Disable the fabbot test-case return type check 2026-07-12 15:35:49 +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
Marvin Feldmann 163f1b6341 [Intl] Add format_list filter using PHP 8.5's IntlListFormatter 2026-07-08 22:22:44 +02:00
Fabien Potencier 971dbcfe92 Fix merge conflict resolution 2026-06-03 19:55:20 +02:00
Fabien Potencier 455be2c916 Merge branch '3.x' into 4.x
* 3.x:
  Add PHPUnit attributes alongside annotations to silence doc-comment metadata deprecations on PHPUnit 11
  Run the test suite against PHPUnit 11.3 in CI
  Make IntegrationTestCase and NodeTestCase compatible with PHPUnit 11

# Conflicts:
#	CHANGELOG
#	src/Test/IntegrationTestCase.php
#	src/Test/NodeTestCase.php
#	tests/Cache/ChainTest.php
#	tests/CustomExtensionTest.php
#	tests/DeprecatedCallableInfoTest.php
#	tests/EnvironmentTest.php
#	tests/ErrorTest.php
#	tests/ExpressionParserTest.php
#	tests/Extension/AttributeExtensionTest.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/FileExtensionEscapingStrategyTest.php
#	tests/LexerTest.php
#	tests/Loader/FilesystemTest.php
#	tests/Node/Expression/CallTest.php
#	tests/Node/Expression/ConditionalTest.php
#	tests/Node/Expression/MacroReferenceTest.php
#	tests/Node/Expression/NullCoalesceTest.php
#	tests/Node/NodeTest.php
#	tests/NodeVisitor/OptimizerTest.php
#	tests/ParserTest.php
#	tests/Resources/LegacyCoreTest.php
#	tests/Runtime/EscaperRuntimeTest.php
#	tests/TemplateTest.php
#	tests/TokenParser/TypesTokenParserTest.php
#	tests/Util/CallableArgumentsExtractorTest.php
#	tests/Util/CallableParametersTest.php
2026-06-03 19:54:02 +02:00
Fabien Potencier 8b35934e68 Run the test suite against PHPUnit 11.3 in CI 2026-06-03 18:21:23 +02:00
Fabien Potencier 653afe5c97 Remove dead SYMFONY_PHPUNIT_VERSION env 2026-05-24 11:13:32 +02:00
Fabien Potencier af449aa039 Merge branch '3.x' into 4.x
* 3.x:
  Set LANG=en_US.UTF-8 for the extra packages tests
  Use per-extension PHPUnit bridge and force PHPUnit 11 on PHP 8.2+
  Install a custom exception handler before bootstrapping KernelTestCase
  Simplify code

# Conflicts:
#	.github/workflows/ci.yml
#	extra/twig-extra-bundle/phpunit.xml.dist
2026-05-24 11:11:20 +02:00
Fabien Potencier d016d2439f Set LANG=en_US.UTF-8 for the extra packages tests 2026-05-24 11:00:21 +02:00
Fabien Potencier 25d7eb60d7 Use per-extension PHPUnit bridge and force PHPUnit 11 on PHP 8.2+ 2026-05-24 10:42:56 +02:00
Fabien Potencier 97a9727e52 Merge branch '3.x' into 4.x
* 3.x:
  Remove Drupal integration tests
  Do not add : void for test methods
  Fix deprecated PHP CS Fixer rules
  Replace FQCN with use statements in SandboxTest
  Fix CS

# Conflicts:
#	.github/workflows/ci.yml
#	tests/Extension/SandboxTest.php
2026-05-22 12:46:51 +02:00
Fabien Potencier 0a80d1a9aa Remove Drupal integration tests 2026-05-22 12:38:21 +02:00
Simon André 949f351458 Fix tiny typo in CI workflow label
Just a nano-typo there

"symfony/translation-contract" -> "symfony/translation-contract**s**"
2026-01-05 22:50:27 +01:00
Nicolas Grekas c649c1658b Merge branch '3.x' into 4.x
* 3.x:
  CS fixes
  Enable Fabbot as a GHA
2025-07-29 10:27:55 +02:00
Nicolas Grekas a1ea8edc94 Enable Fabbot as a GHA 2025-07-29 09:57:34 +02:00
Fabien Potencier 892e0bda58 Fix CI 2025-02-14 09:57:28 +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 dc6356268b Bump min PHP version to 8.1 2025-01-31 21:45:36 +01:00
Ruud Kamphuis c352a8d283 [Twig 4] Add PHPUnit as dev dependency 2024-12-01 10:29:08 +01:00
Fabien Potencier 6f996fc214 Merge branch '3.x' into 4.x
* 3.x:
  Simplify enum usage in docs
  Forbid adding Nodes to EmptyNode
  Add phpstan analysis
  Fix the intl-extra tests
  Fix the string-extra tests when running with older symfony/string
  Fix the exception message to match the expected one for not ready nodes
  Add missing import
  Add BC break note in CHANGELOG for 3.15
  Fix CHANGELOG
  Update CHANGELOG
  Bump version
  Prepare the 3.15.0 release
2024-11-22 10:06:29 +01:00
Vincent Langlet 75d48db822 Add phpstan analysis 2024-11-20 20:05:33 +01:00
Fabien Potencier 14216a8d68 Merge branch '3.x' into 4.x
* 3.x:
  Deprecate using the not unary operator without parenthesis
  Deprecate using ?? without explicit parentheses
  Add support for logical `xor` operator
  Allow running CI on all branches
  [Doc] Fix enum title
  Document Twig vs PHP types
2024-10-02 14:19:28 +02:00
HypeMC 6276d143c3 Allow running CI on all branches 2024-10-01 19:57:51 +02:00
Alexander M. Turek f2053bbea0 PHPUnit 11 2024-09-04 12:11:51 +02:00
Christophe Coevoet 1d71e28a0a Disable the drupal integration tests in the 4.x branch
Drupal uses the AbstractNodeVisitor which is deprecated in 3.x and removed in 4.x, so the job fails all the time.
This should be re-enabled once Drupal can be tested against Twig 4.x.
2024-08-13 16:39:04 +02:00
Fabien Potencier c070cd719c Drop support for 8.0 2024-08-10 12:32:24 +02:00
Fabien Potencier 9acc085110 Merge branch '3.x' into 4.x
* 3.x:
  fix condition for running use_yield test with extra packages
  fix the set of installed packages for TwigExtraBundle on PHP 8.0
  simplify an iterable check
  Fixed typo
  Tweak code, tests, and docs for shuffle
  Add shuffle filter
2024-07-06 10:46:01 +02:00
Fabien Potencier edf489831b minor #4121 fix the set of installed packages for TwigExtraBundle on PHP 8.0 (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

fix the set of installed packages for TwigExtraBundle on PHP 8.0

Prevents symfony/translation-contracts 3 to be installed together with symfony/string 5.4.0-RC1 (see https://github.com/twigphp/Twig/actions/runs/9804849131/job/27073398023#step:8:117). Stable releases of the String component don't suffer from this incompatibility because of symfony/symfony#44246.

Commits
-------

c79c7e7a fix the set of installed packages for TwigExtraBundle on PHP 8.0
2024-07-06 10:45:09 +02:00
Christian Flothmann 07967dea80 fix condition for running use_yield test with extra packages 2024-07-05 23:56:22 +02:00
Christian Flothmann c79c7e7a09 fix the set of installed packages for TwigExtraBundle on PHP 8.0 2024-07-05 23:50:30 +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 9a11ee1c64 Merge branch '3.x' into 4.x
* 3.x:
  Bump version to 3.9.4-DEV
  Fix a warning
  Use ::class everywhere
  Auto-close PRs on subtree-splits
  Bump version
  Prepare the 3.9.3 release
  Update CHANGELOG
  Ensure Lexer:: is always initialized
  fix: #4033 add missing unwrap call when a TemplateWrapper instance can be present
  change extended DI extension class
  fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false
2024-04-24 08:25:00 +02:00
Kevin Bond b212f1bb2f Auto-close PRs on subtree-splits 2024-04-19 08:34:22 +02:00
Fabien Potencier 686d42cb24 Merge branch '3.x' into 4.x
* 3.x:
  Fix compat with PHP 8.4
  Add PHP 8.4 to CI
  Remove usage of array() in fixtures
2024-04-16 11:48:05 -04:00
Fabien Potencier 11511e181d Add PHP 8.4 to CI 2024-04-14 12:38:37 +02:00
Nicolas Grekas 1af9ad0c3e Merge branch '3.x' into 4.x
* 3.x:
  Add `#[YieldReady]` to allow extensions to tell when they're ready for yielding
2024-02-15 11:47:41 +01:00
Nicolas Grekas e70777405d Add #[YieldReady] to allow extensions to tell when they're ready for yielding 2024-02-15 10:27:26 +01:00
Fabien Potencier 497664770c Remove use_yield flag in CI 2024-02-05 16:14:09 +01:00
Fabien Potencier b1c22a1cee Merge branch '3.x' into 4.x
* 3.x:
  Fix tests config
  Fix tests config
2024-02-05 16:12:20 +01:00
Fabien Potencier 84bb846172 Fix tests config 2024-02-05 16:10:51 +01:00
Fabien Potencier d3b5922620 Fix tests config 2024-02-05 16:08:29 +01:00
Fabien Potencier e79c7a3984 Merge branch '3.x' into 4.x
* 3.x:
  Fix bug
  Tweak code
  Add a deprecation when a Node uses echo/print
  Fix tests
  Optimize code
  Add support for templates that do not have output Nodes
  -
  Remove some tests
  -
  Tweak code
  Remove the new yield nodes
  Remove usage of ob_* functions in favor of yielding
  Tweak CI output
2024-02-05 14:27:33 +01:00
Fabien Potencier 71e90fab7b Remove some tests 2024-01-25 13:09:58 +01:00
Fabien Potencier 4fd62abb87 - 2024-01-25 13:09:58 +01:00
Fabien Potencier 3b6cbf98d8 Remove usage of ob_* functions in favor of yielding 2024-01-25 13:09:52 +01:00