Problem/Motivation

The Updated dependencies job for the daily main pipeline is showing a deprecation for Twig 3.29.0:
https://git.drupalcode.org/project/drupal/-/jobs/12883073

User Batch Action (Drupal\Tests\views\Functional\UserBatchAction)
     ⚠ User action
    
    1 test triggered 1 deprecation:
    
    1) /builds/project/drupal/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:51
    Since twig/twig 3.29: Not passing a value for the "default_admin_is_sticky" argument of macro "table_header" is deprecated and the argument will be required in Twig 4.0; give it a default value in the macro definition or pass a value when calling it (in "core/themes/default_admin/templates/views/views-view-table.html.twig" at line 109).
    
    Triggered by:
    
    * Drupal\Tests\views\Functional\UserBatchActionTest::testUserAction (2 times)
      /builds/project/drupal/core/modules/views/tests/src/Functional/UserBatchActionTest.php:38
    
    OK, but there were issues!
    Tests: 1, Assertions: 10, Deprecations: 1.

Steps to reproduce

Proposed resolution

Explicitly set all arguments in all usages of the macro in the template.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3631208

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

godotislate created an issue. See original summary.

godotislate’s picture

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Yep this is ready to go.

Let's backport to everywhere it will go to avoid deprecation warnings if we/when we are forced to upgrade.

alexpott’s picture

Version: main » 11.5.x-dev
Status: Reviewed & tested by the community » Fixed

AS per #4 backported to 11.5.x as it is low risk and avoid deprecation messages.

Committed and pushed 5efd02c7593 to main and 59241a35a11 to 12.0.x and 217493eba07 to 11.x and e074216fada to 11.5.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.

  • alexpott committed e074216f on 11.5.x
    task: #3631208 Explicitly set Twig macro argument value in views-view-...

  • alexpott committed 217493eb on 11.x
    task: #3631208 Explicitly set Twig macro argument value in views-view-...

  • alexpott committed 59241a35 on 12.0.x
    task: #3631208 Explicitly set Twig macro argument value in views-view-...

  • alexpott committed 5efd02c7 on main
    task: #3631208 Explicitly set Twig macro argument value in views-view-...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.