Problem/Motivation

Since we'll have PHP 8 as minimum in D10, we no longer need to have the PHPUnit 8 version in the lock file. We can just pin PHPUnit 9.5 and avoid doing the upgrade dance at test runtime.

Proposed resolution

Just doing the lock update in this issue, all the compatibility/upgrade code left untouched for the moment.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
FileSize
62.25 KB

Patch, obtained by running

composer install
composer run-script drupal-phpunit-upgrade
composer remove phpspec/prophecy

and moving manually phpspec/prophecy-phpunit to the require-dev section.

Status: Needs review » Needs work

The last submitted patch, 2: 3252010-2.patch, failed testing. View results

mondrake’s picture

Status: Needs work » Needs review

Failures are consistent with current HEAD

longwave’s picture

+++ b/composer.lock
@@ -4424,16 +4424,16 @@
             "name": "twig/twig",
-            "version": "v2.14.7",
+            "version": "v2.14.8",

Out of scope but I guess it will happen sooner or later anyway.

We are in no real hurry to do this on its own that I know of, maybe we should remove the PHPUnit 8 shims in this issue too?

mondrake’s picture

Given in the parent there are plans to bump to Twig 3, I think it’s irrelevant here.

Re removing shims, I read somewhere that’s for after dependecies bumping.

longwave’s picture

OK, RTBC once #3251891: Drupal 10 branch failures lands.

I thought about removing this from composer.json as well, but that's a similar shim that we can decide the fate of later:

        "drupal-phpunit-upgrade": [
            "@composer update phpunit/phpunit --with-dependencies --no-progress",
            "@composer require phpspec/prophecy-phpunit:^2 --no-progress --no-suggest"
        ],
mondrake’s picture

#7 IMO we’ll need that for when PHPUnit 10 will release

longwave’s picture

Status: Needs review » Reviewed & tested by the community

RTBC assuming tests pass.

Opened #3252257: Remove PHPUnit 8 support as a followup.

paulocs’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
63.77 KB

Patch #2 does not apply any more.
Attaching a re-row.

paulocs’s picture

Here is the correct patch.

The last submitted patch, 10: 3252010-10.patch, failed testing. View results

Spokje’s picture

Status: Needs review » Reviewed & tested by the community

RTBC for patch #11

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a re-roll.

longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
76.2 KB
+------------------------+---------+---------+
| Production Changes     | From    | To      |
+------------------------+---------+---------+
| guzzlehttp/guzzle      | 7.4.0   | 7.4.1   |
| guzzlehttp/psr7        | 1.8.3   | 2.1.0   |
| laminas/laminas-stdlib | 3.6.1   | 3.6.2   |
| psr/cache              | 1.0.1   | 3.0.0   |
| psr/container          | 1.1.1   | 1.1.2   |
| symfony/var-dumper     | v5.4.0  | v5.4.1  |
| twig/twig              | v2.14.7 | v2.14.8 |
+------------------------+---------+---------+

+------------------------------------+--------+---------+
| Dev Changes                        | From   | To      |
+------------------------------------+--------+---------+
| phpspec/prophecy                   | 1.14.0 | v1.15.0 |
| phpunit/php-code-coverage          | 7.0.15 | 9.2.10  |
| phpunit/php-file-iterator          | 2.0.4  | 3.0.6   |
| phpunit/php-text-template          | 1.2.1  | 2.0.4   |
| phpunit/php-timer                  | 2.1.3  | 5.0.3   |
| phpunit/php-token-stream           | 4.0.4  | REMOVED |
| phpunit/phpunit                    | 8.5.21 | 9.5.10  |
| sebastian/code-unit-reverse-lookup | 1.0.2  | 2.0.3   |
| sebastian/comparator               | 3.0.3  | 4.0.6   |
| sebastian/diff                     | 3.0.3  | 4.0.4   |
| sebastian/environment              | 4.2.4  | 5.1.3   |
| sebastian/exporter                 | 3.1.4  | 4.0.4   |
| sebastian/global-state             | 3.0.1  | 5.0.3   |
| sebastian/object-enumerator        | 3.0.4  | 4.0.4   |
| sebastian/object-reflector         | 1.1.2  | 2.0.4   |
| sebastian/recursion-context        | 3.0.1  | 4.0.4   |
| sebastian/resource-operations      | 2.0.2  | 3.0.3   |
| sebastian/type                     | 1.1.4  | 2.3.4   |
| sebastian/version                  | 2.0.1  | 3.0.2   |
| nikic/php-parser                   | NEW    | v4.13.2 |
| phpspec/prophecy-phpunit           | NEW    | v2.0.1  |
| phpunit/php-invoker                | NEW    | 3.1.1   |
| sebastian/cli-parser               | NEW    | 1.0.1   |
| sebastian/code-unit                | NEW    | 1.0.8   |
| sebastian/complexity               | NEW    | 2.0.2   |
| sebastian/lines-of-code            | NEW    | 1.0.3   |
+------------------------------------+--------+---------+
longwave’s picture

FileSize
61.67 KB

Smaller patch that only includes PHPUnit's actual dependencies

+------------------------------------+--------+---------+
| Dev Changes                        | From   | To      |
+------------------------------------+--------+---------+
| phpspec/prophecy                   | 1.14.0 | v1.15.0 |
| phpunit/php-code-coverage          | 7.0.15 | 9.2.10  |
| phpunit/php-file-iterator          | 2.0.4  | 3.0.6   |
| phpunit/php-text-template          | 1.2.1  | 2.0.4   |
| phpunit/php-timer                  | 2.1.3  | 5.0.3   |
| phpunit/php-token-stream           | 4.0.4  | REMOVED |
| phpunit/phpunit                    | 8.5.21 | 9.5.10  |
| sebastian/code-unit-reverse-lookup | 1.0.2  | 2.0.3   |
| sebastian/comparator               | 3.0.3  | 4.0.6   |
| sebastian/diff                     | 3.0.3  | 4.0.4   |
| sebastian/environment              | 4.2.4  | 5.1.3   |
| sebastian/exporter                 | 3.1.4  | 4.0.4   |
| sebastian/global-state             | 3.0.1  | 5.0.3   |
| sebastian/object-enumerator        | 3.0.4  | 4.0.4   |
| sebastian/object-reflector         | 1.1.2  | 2.0.4   |
| sebastian/recursion-context        | 3.0.1  | 4.0.4   |
| sebastian/resource-operations      | 2.0.2  | 3.0.3   |
| sebastian/type                     | 1.1.4  | 2.3.4   |
| sebastian/version                  | 2.0.1  | 3.0.2   |
| nikic/php-parser                   | NEW    | v4.13.2 |
| phpspec/prophecy-phpunit           | NEW    | v2.0.1  |
| phpunit/php-invoker                | NEW    | 3.1.1   |
| sebastian/cli-parser               | NEW    | 1.0.1   |
| sebastian/code-unit                | NEW    | 1.0.8   |
| sebastian/complexity               | NEW    | 2.0.2   |
| sebastian/lines-of-code            | NEW    | 1.0.3   |
+------------------------------------+--------+---------+
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

back to rtbc

  • catch committed bf3114c on 10.0.x
    Issue #3252010 by paulocs, longwave, mondrake: Lock PHPUnit to 9.5
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

So we're already using this, just via the upgrade script instead of locked. Agreed with keeping the scripts in for the next phpunit update where we may need to do the same thing as in 9.x.

Committed bf3114c and pushed to 10.0.x. Thanks!

mondrake’s picture

Issue tags: +PHPUnit 10
longwave’s picture

Issue tags: +10.0.0 release notes

Status: Fixed » Closed (fixed)

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