Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
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. |
Comment | File | Size | Author |
---|---|---|---|
#5 | upgrade_to_phpunit_5_0-2578813-5.patch | 894.33 KB | hussainweb |
Comments
Comment #2
hussainwebI 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.
Comment #5
hussainwebOkay, different failure than what I was expecting. This should work.
Comment #8
dawehnerfrom https://github.com/sebastianbergmann/phpunit/blob/5.0/composer.json
Comment #9
dawehnerLet's move it to major
Comment #10
hussainwebMissed the PHP 5.6 version requirement. Yes, +1 on postponed.
Comment #11
catchI 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.
Comment #12
dawehnerYeah 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?
Comment #13
catchComment #16
afinnarn CreditAttribution: afinnarn at University of Colorado Boulder commentedI 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.
Comment #17
dawehner@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.
Comment #19
heddnI've just opened #2893232: Deprecated configuration setting "checkForUnintentionallyCoveredCode" used
Comment #21
Mile23core/composer.json says this:
Every indication I've received is that the plan is to use brianium/paratest which has these requirements:
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.
Comment #22
dawehnerWell, they started to require the higher version of phpunit in February: https://github.com/brianium/paratest/commit/309f4923a85bf566e9806b0beb22...
Comment #25
Pasqualleoutdated discussion,
duplicate of #2950132: Support PHPUnit 7 optionally in Drupal 8, while keeping support for ^6.5