Problem/Motivation

In #3497124: Deprecate expectDeprecation(), use PHPUnit's expectUserDeprecationMessage*() instead, expectDeprecation() was deprecated.

Proposed resolution

Replace all expectDeprecation() calls with expectUserDeprecationMessage().

This MR should reach both main and 11.x, so that the deprecation ignore can be removed and contrib start reporting usage of deprecated expectDeprecation() when testing with 11.4.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3552827

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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

mondrake’s picture

Status: Postponed » Active
mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Issue summary: View changes
Priority: Normal » Major

mondrake’s picture

Added a separate MR for 11.x - this will be a bit messy as we add deprecations to both main and 11.x and we remove deprecations from main...

godotislate’s picture

Looking at both main and 11.x MRs, the changes are limited swapping expectDeprecation expectUserDeprecationMessage as expected. Tests are still all passing.

I also pulled down both branches, and searched for "expectDeprecation" case sensitive. The only uses I found were in ExpectDeprecationTrait (which were, uh, expected), and one string in Drupal\Tests\Component\DrupalComponentTest::assertNoCoreUsage(). I think that can be removed? But it probably doesn't affect much.

mondrake’s picture

Fixed #9, thanks

mondrake’s picture

godotislate’s picture

Changes in both MRs look good. 11.x MR is passing, main MR looks like intermittent failures. Fine to self RTBC once main passes.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

All green after rerunning. Setting to RTBC per #12.

  • catch committed f59ec918 on 11.x
    task: #3552827 Replace all expectDeprecation() calls with...

  • catch committed 9dbb3b84 on main
    task: #3552827 Replace all expectDeprecation() calls with...

  • catch committed 846be251 on 11.x
    Revert "task: #3552827 Replace all expectDeprecation() calls with...

  • catch committed 71fceb91 on 11.x
    task: #3552827 Replace all expectDeprecation() calls with...
catch’s picture

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

Committed/pushed to main and the respective MR to 11.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.

Status: Fixed » Closed (fixed)

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