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
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:
- 3631208-explicitly-set-twig
changes, plain diff MR !17456
Comments
Comment #3
godotislatehttps://git.drupalcode.org/project/drupal/-/merge_requests/17456
Updated dependencies test passes: https://git.drupalcode.org/project/drupal/-/pipelines/1004242
Comment #4
longwaveYep 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.
Comment #5
alexpottAS 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!