Commit Graph

13 Commits

Author SHA1 Message Date
Fabien Potencier 6123bfe4ee Merge branch '3.x' into 4.x
* 3.x:
  Reject cross-environment template wrappers in block chains
  Reject cross-environment template wrappers

# Conflicts:
#	CHANGELOG
#	tests/TemplateTest.php
2026-09-14 14:13:36 +02:00
Fabien Potencier dea0483027 feature #4910 Reject template wrappers from another environment (fabpot)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Reject template wrappers from another environment

Twig now rejects `TemplateWrapper` instances created by another `Environment`.

This prevents templates from unexpectedly using another environment's loader, extensions, globals, or sandbox policy.

Commits
-------

83e8f7e123 Reject cross-environment template wrappers in block chains
c1fc112047 Reject cross-environment template wrappers
2026-09-14 14:11:48 +02:00
Fabien Potencier 3d70559df3 Fix two block chain tests referencing a removed data provider 2026-09-14 14:09:55 +02:00
Fabien Potencier 11ff7bf08f Merge branch '3.x' into 4.x
* 3.x:
  Clarify the exception message for nested block chains from another environment
  Report a clear error when using macros imported in a template body that was not rendered

# Conflicts:
#	CHANGELOG
#	src/Template.php
#	tests/CallMacroTest.php
2026-09-14 14:07:14 +02:00
Fabien Potencier 0f5c902d85 bug #4927 Report a clear error when using macros imported in a template body that was not rendered (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Report a clear error when using macros imported in a template body that was not rendered

Commits
-------

72c2f669bd Report a clear error when using macros imported in a template body that was not rendered
2026-09-14 14:05:45 +02:00
Fabien Potencier 56e5c0794b Clarify the exception message for nested block chains from another environment 2026-09-14 11:59:20 +02:00
Fabien Potencier 6b5e02f47d Merge branch '3.x' into 4.x
* 3.x:
  Allow block chains to be composed of other block chains
2026-09-14 11:27:09 +02:00
Fabien Potencier d6b81f9074 Allow block chains to be composed of other block chains 2026-09-14 11:17:44 +02:00
Fabien Potencier 72c2f669bd Report a clear error when using macros imported in a template body that was not rendered 2026-09-12 12:17:17 +02:00
Fabien Potencier 620783d2b1 Fix merge conflict resolution 2026-09-12 10:00:48 +02:00
Fabien Potencier 83e8f7e123 Reject cross-environment template wrappers in block chains 2026-09-12 09:57:01 +02:00
Fabien Potencier 897717d78f Resolve block chains against the render context instead of freezing lineages 2026-09-12 00:03:19 +02:00
Fabien Potencier 49f814ea26 Template runtime and block composition 2026-09-11 04:57:38 -07:00