Problem/Motivation

The new version 3.28 introduced a new deprecation, which makes PHPUnit fail.

Steps to reproduce

Example: https://git.drupalcode.org/project/swiffy_slider/-/jobs/11224054

Proposed resolution

Update twig and fix deprecation in main, and when not backported to d11, then only update the .deprecation-ignore.txt.

For .deprecation-ignore.txt:

# Twig 3.28.
%Since twig/twig 3\.28: The "Drupal\\Core\\Template\\TwigSandboxPolicy::checkSecurity\(\)" method will take a 4th "array \$tests" argument in 4\.0; not declaring it is deprecated\.%
%The "Drupal\\Core\\Template\\TwigSandboxPolicy::checkSecurity\(\)" method will require a new "string\[\] \$tests" argument in the next major version of its interface "Twig\\Sandbox\\SecurityPolicyInterface", not defining it is deprecated\.%

Remaining tasks

-

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

Update to <a href="https://symfony.com/blog/twig-3-28-0-released">Twig 3.28</a>.

Issue fork drupal-3614340

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tobiasb created an issue. See original summary.

tobiasb’s picture

Issue summary: View changes

tobiasb’s picture

Assigned: tobiasb » Unassigned
Issue summary: View changes
Status: Active » Needs review
tobiasb’s picture

Assigned: Unassigned » tobiasb
Status: Needs review » Active
tobiasb’s picture

Assigned: tobiasb » Unassigned
Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

  • catch committed 13fcd9a6 on main
    task: #3614340 Update to Twig 3.28
    
    By: tobiasb
    
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to main, thanks!

We should backport this to 11.x/11.3.x/10.6.x too.

tobiasb’s picture

Assigned: Unassigned » tobiasb

tobiasb’s picture

Assigned: tobiasb » Unassigned
Status: Patch (to be ported) » Needs review

Done. I created also a MR for 11.4.x.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Nice backport to everything!

  • longwave committed 615698ed on 11.4.x
    task: #3614340 Update to Twig 3.28
    
    By: tobiasb
    By: catch
    

  • longwave committed 27942dcf on 11.3.x
    task: #3614340 Update to Twig 3.28
    
    By: tobiasb
    By: catch
    

  • longwave committed dbee687b on 10.6.x
    task: #3614340 Update to Twig 3.28
    
    By: tobiasb
    By: catch
    
longwave’s picture

Version: 11.x-dev » 10.6.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed to their respective branches. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

tobiasb’s picture

fyi: the update was not commited to 11.x.

catch’s picture

Status: Fixed » Reviewed & tested by the community

Re-opening so it doesn't get forgotten. Not at computer to cherry pick myself.

  • longwave committed 77cf7918 on 11.x
    task: #3614340 Update to Twig 3.28
    
    By: tobiasb
    By: catch
    By: longwave
    
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Oops, don't know how I missed that.

Committed and pushed 77cf7918631 to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.