Skip to content

Add a needs_is_sandboxed option for filters, functions, and tests#4800

Merged
fabpot merged 1 commit into
twigphp:3.xfrom
fabpot:needs_sandbox
May 16, 2026
Merged

Add a needs_is_sandboxed option for filters, functions, and tests#4800
fabpot merged 1 commit into
twigphp:3.xfrom
fabpot:needs_sandbox

Conversation

@fabpot
Copy link
Copy Markdown
Contributor

@fabpot fabpot commented May 16, 2026

This PR introduces a new needs_is_sandboxed option for Twig callables.

When set to true, Twig passes the current sandbox state (enabled/disabled) as a boolean to the callable. This lets filters, functions, and tests adapt their behavior depending on whether the sandbox is enabled or not.

@fabpot fabpot merged commit cec6bfb into twigphp:3.x May 16, 2026
39 of 41 checks passed
@fabpot fabpot deleted the needs_sandbox branch May 16, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant