Problem/Motivation

SA-CORE-2026-002's tests from the private issue have not yet been added to core.

Proposed resolution

Add the tests. They will need to be changed slightly from what was committed in private due to #2850635: Merge \Drupal\Tests\Core\Common\AttributesTest and \Drupal\Tests\Core\Template\AttributeTest.

Remaining tasks

NR.

Issue fork drupal-3633178

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

xjm created an issue. See original summary.

xjm’s picture

xjm’s picture

Status: Active » Needs review

The AttributeTest changes need more careful review here since it was not a simple rebase-and-resolve-merge-conflicts; the file they were previously added to was deleted.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Reverted the change from https://git.drupalcode.org/project/drupal/-/commit/d8574bb8d7a1f3faf0fa0...
Applied the MR and ran tests

Failed asserting that exception of type "RuntimeException" is thrown.
Time: 00:16.395, Memory: 179.91 MB
Failed asserting that exception of type "AssertionError" matches expected exception "RuntimeException". Message was: "Cannot load the "view" entity with NULL ID." at
/var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php:329
/var/www/html/core/modules/views/src/ViewExecutable.php:2561
/var/www/html/core/modules/views/tests/src/Kernel/ViewExecutableTest.php:552
1) Drupal\Tests\Core\Template\AttributeTest::testAttributeGadgetChain
Failed asserting that exception of type "Error" matches expected exception "RuntimeException". Message was: "Typed property Drupal\views\ViewExecutable::$displayPluginManager must not be accessed before initialization" at
/var/www/html/core/modules/views/src/ViewExecutable.php:778
/var/www/html/core/modules/views/src/ViewExecutable.php:839
/var/www/html/core/modules/views/src/ViewExecutable.php:1257
/var/www/html/core/modules/views/src/ViewExecutable.php:1447
/var/www/html/core/modules/views/src/ViewExecutable.php:1511
/var/www/html/core/lib/Drupal/Core/Template/Attribute.php:332
/var/www/html/core/tests/Drupal/Tests/Core/Template/AttributeTest.php:600

No additional feedback about the tests.

  • catch committed 1131fffa on 11.4.x
    task: #3633178 Add test coverage for SA-CORE-2026-002
    
    By: xjm
    By:...

  • catch committed 76e02e70 on 11.5.x
    task: #3633178 Add test coverage for SA-CORE-2026-002
    
    By: xjm
    By:...

  • catch committed f0d7f3f1 on 11.x
    task: #3633178 Add test coverage for SA-CORE-2026-002
    
    By: xjm
    By:...

  • catch committed 4b709b2e on 12.0.x
    task: #3633178 Add test coverage for SA-CORE-2026-002
    
    By: xjm
    By:...

  • catch committed a6eb2a60 on main
    task: #3633178 Add test coverage for SA-CORE-2026-002
    
    By: xjm
    By:...
catch’s picture

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

Committed/pushed to main and cherry-picked back through to 11.4.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.