Problem/Motivation

Follow up to #3527936-43: Introduce support for PHPUnit 12.

Remove the compatibility trait, it’s a no-op at the moment and simce PHPUnit 11.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3582118

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.

debdeep.mukhopadhyay’s picture

I am working on this

debdeep.mukhopadhyay’s picture

Hi @mondrake,

Thank you for reporting this issue.

I have tested this on a fresh Drupal setup using the latest development codebase (Drupal 11.x-dev) with PHP 8.5 via DDEV.

### What I checked:

* Searched the entire core codebase for `PhpunitCompatibilityTrait` and found no occurrences.
* Verified related PHPUnit usages (e.g., `getMock()`, deprecated patterns) across core test files.
* Ran PHPUnit tests locally (`ddev exec phpunit core/tests`) to ensure the test suite executes correctly.

### Result:

* The trait `PhpunitCompatibilityTrait` is no longer present in the codebase.
* PHPUnit tests are running successfully (progress reaching ~99% before completion).
* This indicates that the compatibility-related issues mentioned here have already been addressed.

### Conclusion:

Based on the above verification, it appears that this issue has already been resolved in the current codebase.

Could you please confirm from your side and update the issue status accordingly?

Thank you!

mondrake’s picture

Status: Active » Needs review

@debdeep.mukhopadhyay I am not sure what you tested in #3, since I added a MR afterwards.

The MR removes the trait, and the version dependent aliased trait.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

@debdeep.mukhopadhyay pretty obvious you used AI so sharing an issue etiquette link https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...

    Time: 00:41.963, Memory: 16.00 MB
    
    Layout Builder (Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilder)
     ✘ Layout builder ui
       ┐
       ├ Behat\Mink\Exception\ElementNotFoundException: Element matching css ".layout__region--second .block-system-powered-by-block" not found.
       │
       │ /builds/vendor/behat/mink/src/WebAssert.php:465
       │ /builds/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php:194
       ┴
     ✔ Configurable layout sections
     ✔ Layout no dialog
    
    FAILURES!
    Tests: 3, Assertions: 59, Failures: 1.
---- Drupal\Tests\text\FunctionalJavascript\TextareaWithSummaryTest ----

Unrelated. Seems like a good removal.

  • amateescu committed af344093 on main
    task: #3582118 Remove the PHPUnitCompatibiltyTrait
    
    By: mondrake
    By:...
amateescu’s picture

Status: Reviewed & tested by the community » Fixed

Committed af34409 and pushed to main. 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.

mondrake’s picture

Issue tags: +PHPUnit 12

Status: Fixed » Closed (fixed)

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