Skip to content

Bump twig/twig from 3.11.2 to 3.31.1 - #347

Closed
dependabot[bot] wants to merge 1 commit into
2.xfrom
dependabot/composer/twig/twig-3.31.1
Closed

dependabot[bot] wants to merge 1 commit into
2.xfrom
dependabot/composer/twig/twig-3.31.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Bumps twig/twig from 3.11.2 to 3.31.1.

Release notes

Sourced from twig/twig's releases.

v3.31.1

Changelog (twigphp/Twig@v3.31.0...v3.31.1)

  • bug #5049 Fix arrow functions in the parent expression of extends and embed tags (@​nicolas-grekas)
  • bug #5047 Check the sandbox policy before the cache tag coerces its key and tags to strings (@​fabpot)
  • bug #5046 Include the autoescape strategy and always-allowed sandbox registrations in compiled template keys (@​fabpot)
  • security #cve-2026-133773 Limit the number of converters kept by html_to_markdown (@​nicolas-grekas)
  • security #cve-2026-133766 Check __toString() on spread arguments in the sandbox (@​nicolas-grekas)
  • security #cve-2026-133763 Check __toString() on the result of tests in the sandbox (@​fabpot)
  • security #cve-2026-133764 Check __toString() on the input of tests in the sandbox (@​fabpot)
  • security #cve-2026-133767 Check the sandbox policy against dynamic embed parent expressions (@​fabpot)
  • security #cve-2026-133770 Prevent sandboxed templates from calling the Markup constructor (@​fabpot)
  • security #cve-2026-133769 Stop html_cva from exposing the properties of objects used as classes (@​fabpot)
  • security #cve-2026-133765 Check __toString() on the result of assignment expressions in the sandbox (@​fabpot)
  • security #cve-2026-133768 Stop the join filter from exposing the properties of non-iterable objects (@​fabpot)

v3.31.0

Changelog (twigphp/Twig@v3.30.0...v3.31.0)

  • bug #5042 Skip caching class lists longer than 2 KB in html_cva() (@​nicolas-grekas)
  • bug #5043 Don't cache Intl formatters built from long patterns, attributes, or symbols (@​nicolas-grekas)
  • bug #5044 Fully normalize template names in FilesystemLoader (@​nicolas-grekas, @​fabpot)
  • bug #5039 Fix a variable not being escaped when it has the name of a macro import alias of another scope (@​jack-worman)
  • bug #4985 Normalize the template name in FilesystemLoader::getSourceContext() (@​KalimeroMK)
  • bug #4987 Fix compiled templates depending on the directory of their source when debug is disabled (@​nicolas-grekas)
  • minor #5009 Speed up the with tag by adding the globals to the new context in place (@​nicolas-grekas)
  • feature #4995 Allow extending AttributeExtension to declare callables with attributes (@​GromNaN)
  • bug #5017 Fix html_cva() ignoring a boolean default variant (@​fabpot)
  • bug #5014 Fix PHP 8.5 deprecation in html_cva() when a recipe value is null (@​goba)
  • feature #4997 Add the collate function to compare strings in the alphabetical order of a locale (@​fabpot)
  • feature #4989 [3.x] Allow registering an extension class lazily with AttributeExtension (@​nicolas-grekas)
  • feature #4991 Allow marking a Markup instance as safe for some escaping strategies only (@​fabpot)
  • feature #4990 Consider a class safe for html_attr also safe for html_attr_relaxed and html at runtime (@​fabpot)
  • bug #4992 Fix reading an attribute through its getter initializing a lazy object when the property is not public (@​abp002)
  • minor #4984 Speed up applying html_cva() recipes that resolve to classes already seen (@​Kocal)
  • bug #4988 Fix compiled float literals depending on the serialize_precision ini setting (@​nicolas-grekas)
  • minor #4954 Speed up loading compiled templates that OPcache already holds (@​nicolas-grekas)
  • minor #4976 Speed up traversing nodes with node visitors (@​nicolas-grekas)
  • feature #4951 Allow skipping the directory check when adding paths to FilesystemLoader (@​nicolas-grekas)
  • bug #4980 Fix the deprecated tag generating invalid PHP for an integer message (@​fabpot)
  • bug #4974 Fix the loop variable of a for tag being undefined in the sequence of a nested loop (@​fabpot)
  • bug #4979 Reject the spread operator outside sequences, mappings, and call arguments (@​fabpot)
  • bug #4964 Discard what the non-selected branch of a guard tag registers on the parser (@​fabpot)
  • bug #4960 Reset the escaping state when compiling a new template after a compilation error (@​fabpot)
  • bug #4959 Reject a Template instance created by another environment when resolving templates (@​fabpot)
  • bug #4972 Fix the sandbox not reporting the line of a rejected guard tag (@​fabpot)
  • minor #4965 Rewrite the sandbox documentation around what developers need to know (@​fabpot)
  • minor #4949 Skip the property checker call and memoize the class constant probe when reading an object attribute (@​fabpot)
  • bug #4947 Stop looking up a macro twice in its own namespace when it is declared by a parent (@​fabpot)

... (truncated)

Changelog

Sourced from twig/twig's changelog.

3.31.1 (2026-11-24)

  • Fix a security issue in the sandbox mode allowing the join filter to expose the properties of non-iterable objects
  • Fix a security issue in the sandbox mode allowing assignment expressions to call __toString() on objects without checking the policy
  • Fix a security issue in the sandbox mode allowing html_cva to expose the properties of objects used as classes or variant values
  • Fix sandboxed templates being able to replace the content of a Markup object by calling its constructor
  • Fix the sandbox not checking filters, functions, tests, and __toString() calls in a dynamic embed parent expression
  • Fix sandbox __toString() policy bypasses through test inputs
  • Fix sandbox __toString() policy bypasses through test results
  • Fix sandbox __toString() policy bypasses through spread arguments
  • Fix the html_to_markdown filter keeping an unbounded number of converters in memory
  • Fix compiled template cache collisions for resolved autoescaping strategies and sandbox always-allowed registrations
  • Fix the cache tag calling __toString() on its key and tags without checking the sandbox policy
  • Fix the PHP warning when an arrow function is used in the parent expression of an extends or embed tag

3.31.0 (2026-11-23)

  • Fix FilesystemLoader template names depending on leading slashes, . and .. segments, or the @__main__ prefix used to load a template first
  • Fix IntlExtension caching formatters built from long patterns, attributes, or symbols
  • Fix compiled templates depending on the directory of their source when debug is disabled
  • Speed up the with tag by adding the globals to the new context in place
  • Fix a variable not being escaped when it has the name of a macro import alias of another block or macro
  • Fix html_cva() ignoring a boolean default variant
  • Fix a PHP 8.5 deprecation in html_cva() when a recipe value is null
  • Add the collate function to twig/intl-extra to compare strings in the alphabetical order of a locale
  • Fix environments with different optimizations levels sharing compiled templates
  • Fix reading an attribute through its getter initializing a lazy object when the property is not public
  • Fix compiled float literals depending on the serialize_precision ini setting
  • Fix the loop variable being undefined when used in the sequence of a nested for tag
  • Reject a deprecated Template instance created by another environment in Environment::resolveTemplate()
  • Fix a compilation error inside an autoescape tag leaking its escaping strategy into the next compiled template
  • Fix FilesystemLoader template names depending on the slash style used to load a template first
  • Fix the non-selected branch of a guard tag registering its parent, blocks, and macros
  • Speed up reading object attributes backed by getters or class constants
  • Fix the sandbox not reporting the line of a rejected guard tag
  • Fix the spread operator compiling to invalid PHP outside sequences, mappings, and call arguments
  • Fix the deprecated tag generating invalid PHP for an integer message
  • Add a third argument to FilesystemLoader::addPath() and FilesystemLoader::prependPath() to skip checking that the directory exists
  • Speed up traversing nodes with node visitors
  • Speed up loading compiled templates that OPcache already holds
  • Speed up applying html_cva() recipes that resolve to classes already seen
  • Fix a class marked safe for html_attr not being considered safe in html and html_attr_relaxed contexts
  • Add a way to mark a Twig\Markup instance as safe for some escaping strategies only
  • Make Environment::getExtension() return the runtime of an extension class registered with AttributeExtension
  • Make Environment::getRuntime() fall back to the registered extension of the same class
  • Allow extending AttributeExtension to declare an extension's filters, functions, and tests with attributes
  • Speed up calling a macro declared by a parent template

3.30.0 (2026-09-25)

... (truncated)

Commits
  • 6f6ec37 Prepare the 3.31.1 release
  • 05455cd bug #5049 Fix arrow functions in the parent expression of extends and `embe...
  • 6aca6da Fix arrow functions in the parent expression of extends and embed tags
  • 00b6dcb bug #5047 Check the sandbox policy before the cache tag coerces its key and t...
  • fb692ea Check the sandbox policy before the cache tag coerces its key and tags to str...
  • b989086 bug #5046 Include the autoescape strategy and always-allowed sandbox registra...
  • 5dfbad3 Include the autoescape strategy and always-allowed sandbox registrations in c...
  • 4abb638 security #cve-2026-133773 Limit the number of converters kept by html_to_mark...
  • d026370 security #cve-2026-133766 Check __toString() on spread arguments in the sandb...
  • 2cf6348 security #cve-2026-133763 Check __toString() on the result of tests in the sa...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [twig/twig](https://github.com/twigphp/Twig) from 3.11.2 to 3.31.1.
- [Release notes](https://github.com/twigphp/Twig/releases)
- [Changelog](https://github.com/twigphp/Twig/blob/3.x/CHANGELOG)
- [Commits](twigphp/Twig@v3.11.2...v3.31.1)

---
updated-dependencies:
- dependency-name: twig/twig
  dependency-version: 3.31.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Nov 29, 2026
@dependabot @github

dependabot Bot commented on behalf of github Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Looks like twig/twig is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Nov 29, 2026
@dependabot
dependabot Bot deleted the dependabot/composer/twig/twig-3.31.1 branch November 29, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants