Problem/Motivation

This error was revealed in the old bot test https://qa.drupal.org/pifr/test/1170668.

PHP Strict Standards:  Drupal\simpletest\WebTestBase and Drupal\simpletest\AssertContentTrait define the same property ($content) in the composition of Drupal\system\Tests\Render\AjaxPageStateTest. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in /var/lib/drupaltestbot/sites/default/files/checkout/core/modules/system/src/Tests/Render/AjaxPageStateTest.php on line 115

Checking the cause I found that \Drupal\system\Tests\Render\AjaxPageStateTest uses the \Drupal\simpletest\AssertContentTrait trait. But AjaxPageStateTest extends WebTestBase and that is already using the same trait.

Proposed resolution

Remove the use AssertContentTrait; from \Drupal\system\Tests\Render\AjaxPageStateTest.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#4 ajax.png714.01 KBclaudiu.cristea
trait_included_twice.patch612 bytesclaudiu.cristea

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Issue tags: +Quick fix
claudiu.cristea’s picture

Issue summary: View changes
StatusFileSize
new714.01 KB

This is visible also on drupalci now, but it doesn't make the test fail.

claudiu.cristea’s picture

Priority: Normal » Critical

I guess is critical?

  • effulgentsia committed 3d18097 on 8.0.x
    Issue #2579965 by claudiu.cristea: AssertContentTrait "use"d twice in...
effulgentsia’s picture

Status: Needs review » Fixed

Pushed to 8.0.x. Thanks!

fabianx’s picture

We need a critical follow-up for Drupal CI please ...

claudiu.cristea’s picture

Status: Fixed » Needs work

The last submitted patch, trait_included_twice.patch, failed testing.

claudiu.cristea’s picture

Status: Needs work » Fixed

The old bot arrived to late for the dinner. Fixed per #7.

Status: Fixed » Closed (fixed)

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