Problem/Motivation

PHPUnit 9 deprecated ::expectError*() and ::expectWarning*()methods. They're removed from PHPUnit 10.

Proposed resolution

  1. Deprecate passing TrustedCallbackInterface::TRIGGER_WARNING for $error_type in DoTrustedCallbackTrait::doTrustedCallback() in 10.3
  2. Remove the feature and the interface constant in D11

Issue fork drupal-3427178

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

mondrake created an issue. See original summary.

mondrake’s picture

Assigned: Unassigned » mondrake

Working on this.

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review

MR!7011 is for 10.3.x. Once we confirm this is the way to go, I'd add a D11 branch for the removal, à la #3427173: Replace calls to :::expectWarning*() in Drupal\Tests\Component\PhpStorage\FileStorageTest.

smustgrave’s picture

Change looks fine to me. Do you want to open the 11.x branch also?

mondrake’s picture

mondrake’s picture

Assigned: mondrake » Unassigned
smustgrave’s picture

longwave’s picture

Status: Postponed » Needs work

I think we should go ahead and deprecate TRIGGER_WARNING. As far as I can see it was never used in core (except for the test coverage) and can't find any uses in contrib.

longwave’s picture

Status: Needs work » Needs review

MR!7011 for 10.3.x and MR!7399 for 11.x

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Removal seems fine, all green.

  • catch committed c8cfcf07 on 11.x
    Issue #3427178 by mondrake, longwave: Replace calls to ::expectWarning...

  • catch committed a50c07aa on 10.3.x
    Issue #3427178 by mondrake, longwave: Replace calls to ::expectWarning...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Commited/pushed to 11.x and 10.3.x respectively, thanks!

quietone’s picture

There is a change record for this issue that consists of "@tbd"

catch’s picture

Whoops. I updated the CR with how to handle the deprecation.

Status: Fixed » Closed (fixed)

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