Commit Graph

11 Commits

Author SHA1 Message Date
Fabien Potencier eff2f569f5 Complete IncludeNode template parameter signature 2026-08-29 10:08:18 +02:00
Fabien Potencier eb8ca3b887 Remove deprecated code 2026-06-11 08:16:23 +02:00
Fabien Potencier 04ace9dba0 Merge branch '3.x' into 4.x
* 3.x:
  Handle single-node child template bodies in cleanup
  Keep captured block definitions supported
  Clarify captured block deprecation wording
  Simplify correctness visitor checks
  Move extends validation into correctness visitor
  Fix correctness visitor regressions
  Fix test assertions that did not verify the intended behavior
  Address review: fix block-nesting checks in CorrectnessNodeVisitor
  Move the extends-in-block and extends-in-macro errors into the CorrectnessNodeVisitor
  Introduce a CorrectnessNodeVisitor to validate that templates are semantically correct
  Mark Markup as final
  Allow calling a macro with a dynamic name via the dot operator
  Add an allow-list for tests to the sandbox security policy
  Fix markdown_to_html mangling content that starts with a blank line

# Conflicts:
#	CHANGELOG
#	doc/deprecated.rst
#	doc/sandbox.rst
#	src/ExpressionParser/Infix/DotExpressionParser.php
#	src/Extension/CoreExtension.php
#	src/Markup.php
#	src/Node/CheckSecurityNode.php
#	src/Node/Expression/Filter/DefaultFilter.php
#	src/Node/Expression/NullCoalesceExpression.php
#	src/Node/IfNode.php
#	src/NodeVisitor/SandboxNodeVisitor.php
#	src/Parser.php
#	src/Sandbox/SecurityPolicy.php
#	tests/Extension/SandboxTest.php
#	tests/ParserTest.php
2026-06-11 07:57:54 +02:00
Fabien Potencier 416d07da1d Add an allow-list for tests to the sandbox security policy 2026-06-06 11:08:56 +02:00
Fabien Potencier 19099de78e Merge branch '3.x' into 4.x
* 3.x:
  Skip the sandbox `__toString` check on arguments whose PHP parameter type cannot implicitly coerce to string
  Fix  CS
  Bump version
  Prepare the 3.27.1 release
  Fix inconsistent array access with a Stringable key
  Preserve IteratorAggregate identity in sandbox __toString walker
  Fix tests
  Bump version
  Prepare the 3.27.0 release
  Fix sandbox filter/tag/function allow-list bypass when sandbox state changes between renders
  Document new support for any expression as a dynamic mapping key
  Fix sandbox __toString policy bypass via dynamic mapping keys
  Fix deprecation notices in tests
  Guard sandbox `__toString` walker against self-referencing iterables
  Fix sandbox `__toString` bypass via `Stringable` + `Traversable` containers
  Fix sandbox `__toString` bypass via the `in` and `not in` operators
  Fix sandbox __toString bypass via Traversable in join/replace filters
  Mark new SourcePolicyInterface column filter tests as @group legacy
  Fix sandbox bypass in the "column" filter under SourcePolicyInterface
  Fix sandbox bypass in deprecated internal wrappers

# Conflicts:
#	CHANGELOG
#	src/Environment.php
#	src/Node/Expression/ArrayExpression.php
#	src/Node/Expression/CallExpression.php
#	src/Resources/core.php
#	src/Template.php
#	src/Util/CallableArgumentsExtractor.php
#	src/Util/ReflectionCallable.php
#	tests/Extension/SandboxTest.php
#	tests/Resources/LegacyCoreTest.php
#	tests/TemplateTest.php
2026-06-02 14:05:57 +02:00
Fabien Potencier 23eb6eb126 Fix sandbox filter/tag/function allow-list bypass when sandbox state changes between renders 2026-05-27 14:59:42 +02:00
Fabien Potencier 9d16de6e3d Deprecate passing $ifexpr to ForNode 2025-01-24 15:01:34 +01:00
Fabien Potencier b9e3ccd7a3 Merge branch '3.x' into 4.x
* 3.x:
  fix version numbers for deprecations
  Require "erusev/parsedown": "dev-master as 1.x-dev"
  Support underscores in number literals
  Remove deprecate usage of AssignNameExpression in For Node
  Update coding standards
2024-12-02 17:35:59 +01:00
Simon André da4d96692a Support underscores in number literals 2024-12-02 09:46:54 +01:00
Vincent Langlet 0cb1728113 PHPStan fixes 2024-11-29 23:15:53 +01:00
Vincent Langlet 75d48db822 Add phpstan analysis 2024-11-20 20:05:33 +01:00