PHPUnit 5.0 is out, and it supports PHP 7. PHP 7 support is not marked for PHPUnit 4.8, which means it is a good idea to upgrade.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it is an external library upgrade
Issue priority Critical because it is a major version upgrade to an external library and also introduces support for PHP 7. I don't think this is release blocking, though.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hussainweb created an issue. See original summary.

hussainweb’s picture

Priority: Major » Critical
Status: Active » Needs review
FileSize
853.26 KB

I am not sure if this patch would pass as it is just an upgrade. I doubt if PHPUnit 5.0 would be BC. Anyway, let's see what are the failures. I am marking it as critical as intended in IS.

Status: Needs review » Needs work

The last submitted patch, 2: upgrade_to_phpunit_5_0-2578813-2.patch, failed testing.

The last submitted patch, 2: upgrade_to_phpunit_5_0-2578813-2.patch, failed testing.

hussainweb’s picture

Status: Needs work » Needs review
FileSize
894.33 KB

Okay, different failure than what I was expecting. This should work.

Status: Needs review » Needs work

The last submitted patch, 5: upgrade_to_phpunit_5_0-2578813-5.patch, failed testing.

The last submitted patch, 5: upgrade_to_phpunit_5_0-2578813-5.patch, failed testing.

dawehner’s picture

Status: Needs work » Postponed
dawehner’s picture

Priority: Critical » Major
Issue tags: +Revisit on php 5.6

Let's move it to major

hussainweb’s picture

Missed the PHP 5.6 version requirement. Yes, +1 on postponed.

catch’s picture

Title: Upgrade to PHPUnit 5.0 » Figure out PHPUnit version support
Category: Task » Plan

I think we need to discuss this a bit more. We have a situation where one PHPUnit version doesn't support PHP7 officially, and one PHPUnit version doesn't support PHP 5.5 officially, and yet we aim to support both. This might not actually be affecting unit tests on PHP7, but since we don't have 100% pass rate and PHP 7 isn't out yet, can't be completely sure.

Given we only need the library to actually run tests, could we try to alternate between the two depending on PHP version?

This means our tests would be restricted to functionality that exists in both versions.

Leaving postponed because it doesn't really make sense to worry about this until PHP 7 is out (or our tests pass on a release candidate, or this is known to block our tests passing), but we might want to talk about it before dropping PHP 5.5 support.

dawehner’s picture

Yeah its a mess, well sebastian has really strong opinions.

Once we have removed the vendor dir out of core I'm curious whether we could have multiple composer.json files with different versions of phpunit depending on the PHP version?

catch’s picture

Issue tags: +lifeboat

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

afinnarn’s picture

I am trying to follow the PHPUnit versioning in Drupal 8, and I saw this issue. Since it's been a year, maybe there is more to update, but I still see version 4.8 listed in the composer.json file for core. Per https://phpunit.de/, version 4.8 will not be supported after a few days have passed.

So, I am going to use 5.7 for writing my own tests, but I'm wondering what the status of this is from people who know a lot more.

dawehner’s picture

@afinnarn
Well, nothing changed. PHPUnit ~5 doesn't support PHP 5.5, and we didn't yet dropped php 5.5 support, due to for example hosting provider requirements. Maybe this changed in the meantime.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

heddn’s picture

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

core/composer.json says this:

        "phpunit/phpunit": ">=4.8.35 <5",
        "symfony/phpunit-bridge": "~3.2.8"

Every indication I've received is that the plan is to use brianium/paratest which has these requirements:

php: >=7.0
phpunit/phpunit: ~6.0
phpunit/php-timer: ^1.0.4
symfony/console: ~2.3|~3.0
symfony/process: ~2.3|~3.0
brianium/habitat: 1.0.0
ext-reflection: *
ext-simplexml: *
ext-pcre: *
composer/semver: ~1.2

This means we can't use brianium/paratest any time soon.

Also note that symfony/phpunit-bridge has a very narrow set of phpunit version compatibilities, which excludes phpunit 6.

dawehner’s picture

Well, they started to require the higher version of phpunit in February: https://github.com/brianium/paratest/commit/309f4923a85bf566e9806b0beb22...

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Pasqualle’s picture

Status: Postponed » Closed (duplicate)