Problem/Motivation
\Drupal\Tests\views\Kernel\Handler\FieldKernelTest triggers deprecations on PHP 8.5 due to the way the test is written.
1) /builds/issue/drupal-3523596/core/modules/views/src/Plugin/views/field/FieldPluginBase.php:1696
Using null as an array offset is deprecated, use an empty string instead
Steps to reproduce
Run \Drupal\Tests\views\Kernel\Handler\FieldKernelTest and \Drupal\Tests\views\Kernel\Handler\FieldDropbuttonTest::testDropbuttonMarkupShouldNotLeakBetweenRows and \Drupal\Tests\views\Kernel\Handler\FieldSelfTokensTest and \Drupal\Tests\views\Functional\Handler\FieldWebTest::testTextRendering and \Drupal\Tests\views\Functional\Handler\FieldWebTest::testAlterUrl
Proposed resolution
Fix test to not trigger deprecations in FieldPluginBase.php:1696
Remaining tasks
User interface changes
None
Introduced terminology
N/a
API changes
None
Data model changes
None
Release notes snippet
N/a
Issue fork drupal-3557459
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
Comment #2
alexpottComment #4
alexpottComment #5
alexpottComment #6
smustgrave commentedLocally using 8.5.0RC3 did not work so ran in the gitlab runner
Ran FieldKernelTest got 5 tests triggered 1 PHP deprecation:
Ran FieldDropbuttonTest::testDropbuttonMarkupShouldNotLeakBetweenRows got 1 test triggered 1 PHP deprecation:
Ran FieldSelfTokensTest got 1 test triggered 1 PHP deprecation
Ran FieldWebTest::testTextRendering got 1 test triggered 1 PHP deprecation:
Ran FieldWebTest::testAlterUrl got 1 test triggered 1 PHP deprecation:
Locally I'm still getting 1 deprecation,
1) /builds/issue/drupal-3557459/core/lib/Drupal/Core/Config/Schema/Mapping.php:185
Using null as an array offset is deprecated, use an empty string instead
Is this in scope? Example for FieldKernelTest https://git.drupalcode.org/issue/drupal-3557459/-/jobs/7282445
Comment #7
alexpott@smustgrave no that is not in scope. The scope is the
deprecation.
Merged in HEAD because that deprecation is already fixed.
Comment #8
smustgrave commentedRock on!
Comment #11
catchCommitted/pushed to 11.x and cherry-picked to 11.3.x, thanks!