Problem/Motivation

PHPUnit 9.6.0 is released. We need to successfully upgrade to this and solve all deprecations before we can start thinking about PHPUnit 10.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3338907-3.patch17.29 KBlongwave

Issue fork drupal-3338907

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

longwave created an issue. See original summary.

longwave’s picture

Issue tags: +PHPUnit 9.6
longwave’s picture

Status: Active » Needs review
StatusFileSize
new17.29 KB
+-----------------------------+---------+---------+
| Dev Changes                 | From    | To      |
+-----------------------------+---------+---------+
| doctrine/instantiator       | 1.4.1   | 2.0.0   |
| nikic/php-parser            | v4.15.2 | v4.15.3 |
| phpspec/prophecy            | v1.16.0 | v1.17.0 |
| phpunit/php-code-coverage   | 9.2.19  | 9.2.24  |
| phpunit/phpunit             | 9.5.26  | 9.6.0   |
| sebastian/environment       | 5.1.4   | 5.1.5   |
| sebastian/recursion-context | 4.0.4   | 4.0.5   |
| sebastian/type              | 3.2.0   | 3.2.1   |
+-----------------------------+---------+---------+
mondrake’s picture

FTR, I'm not sure what is the eventual situation for this: https://github.com/sebastianbergmann/phpunit/issues/4775.

Need to check if there are remaining setMethods() calls in core, I'm not sure an automated deprecation error is fired here.

Status: Needs review » Needs work

The last submitted patch, 3: 3338907-3.patch, failed testing. View results

mondrake’s picture

Assigned: Unassigned » mondrake

Working on this.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review

Converted PHPUnit warnings to deprecations and ignored them.

larowlan’s picture

Priority: Normal » Critical

This is critical because our ::upgradePHPUnit script is failing on 9.5.x as it installs 9.6

See https://www.drupal.org/pift-ci-job/2585008

larowlan’s picture

Although, we may choose to open a separate issue to prevent the composer script going all the way to 9.6 to avoid needing to make changes to 9.4/9.5

daffie’s picture

Status: Needs review » Needs work

Changing the status to needs work for the requested comment on the DiffOpTest

alexpott’s picture

I've created #3339854: Add conflict on PHPUnit ^9.6 to Drupal 9 to fix 9.5 - so that we can take our time here to get this one right.

larowlan’s picture

Priority: Critical » Normal

Dropping priority back

mondrake’s picture

Rerolled

mondrake’s picture

Status: Needs work » Needs review

I think we should try and do this before 10.1, silencing deprections or warnings and/or workarounds but at least not to remain too much behind in the release train. Keep changes to a minimum.

In any case I think we already have issues open for most if not all the individual changes that will be needed for PHPUnit 10, and the MR in #3217904: [meta] Support PHPUnit 10 in Drupal 11 can be used to identify what is missing regardless of whatever we silence or skip in the meantime.

mondrake’s picture

Title: Update to PHPUnit 9.6 » Update to PHPUnit 9.6.7
mondrake’s picture

Issue tags: +PHPUnit 10
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks - this seems the pragmatic thing to do for now to get us on to PHPUnit 9.6, and then we fix the deprecation skips in followup issues.

Is it worth backporting the deprecation skips to allow this upgrade on 10.0 and even 9.5?

catch’s picture

Status: Reviewed & tested by the community » Needs work

Needs a rebase.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

MR!3386 applies to 10.1.x for me with no issues.

  • catch committed fa3c3ee3 on 10.1.x
    Issue #3338907 by mondrake, longwave, larowlan, daffie, alexpott: Update...
catch’s picture

Status: Reviewed & tested by the community » Fixed

OK that is weird now it's fine for me too, must be PEBKAC.

Committed fa3c3ee and pushed to 10.1.x. Thanks!

longwave’s picture

Issue tags: +10.1.0 release notes

jonathan1055’s picture

Could this commit be the cause of #3358927: SchedulerRulesEventsTest fail with "Indirect modification of overloaded property ... has no effect"? The tests were all passing 27 April, failed 8 May. D10.1 and php8.1 on both, no code changes. The only difference I can see is this PHPunit upgrade from 9.5.28 to 9.6.7

Status: Fixed » Closed (fixed)

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