Problem/Motivation

assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#5 3217709-5.patch17.81 KBsudiptadas19
#3 3217709-3.patch18.93 KBsudiptadas19

Comments

mondrake created an issue. See original summary.

sudiptadas19’s picture

Status: Active » Needs review
StatusFileSize
new18.93 KB

Added patch. Please review it.

mondrake’s picture

Status: Needs review » Needs work
+++ b/core/tests/Drupal/Tests/Traits/PhpUnitWarnings.php
@@ -40,7 +40,6 @@ trait PhpUnitWarnings {
-    'assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.',

This should not be removed, it's the conversion of the PHPUnit deprecation warning into a deprecation error that can be captured by our deprecation listener. It can only be safely removed when the minumum PHPUnit version will be 10.

sudiptadas19’s picture

Status: Needs work » Needs review
StatusFileSize
new17.81 KB

Modified the file changes as mentioned in #4.
Please review it.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

RTBC. The PHP 7.3 test is green, indicating tests run OK on PHPUnit8. Deprecation silencer removed and all conversions done.

Even if this is a small patch, please add an interdiff when adding patches after the first one, so to facilitate reviewing. Thanks!

  • catch committed 63c54d9 on 9.3.x
    Issue #3217709 by sudiptadas19, mondrake: Replace usages of assertRegExp...
catch’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.3.x. Also backported to 9.2.x without the deprecation suppression removal.

  • catch committed 3059444 on 9.2.x
    Issue #3217709 by sudiptadas19, mondrake: Replace usages of assertRegExp...
mondrake’s picture

Hang on, #3174200: Use PHPUnit-bridge polyfills for forward compatibility layer needs to be committed to 9.2.x before backporting, or 9.2.x HEAD will fail

catch’s picture

Oof. Let's go forward rather than back, committed #3174200: Use PHPUnit-bridge polyfills for forward compatibility layer.

Status: Fixed » Closed (fixed)

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