Problem/Motivation

Running Drupal tests using the core phpunit.xml configuration under PHPUnit 9 yields

PHPUnit 9.5.4 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Proposed resolution

Make changes in order to drop deprecated schema elements from the config file. Will it work backwards in PHPUnit 8? If not, either we have to wait dropping PHPUnit 8 support, or find a way to run tests with different config files based on the test runner version.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#6 3222004-6.patch2.25 KBlongwave

Issue fork drupal-3222004

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Active » Needs review
longwave’s picture

The new schema was introduced in PHPUnit 9.3 and it doesn't seem to be supported in PHPUnit 8, so I think we have to postpone this until we support >9.3 only.

Docs: https://github.com/sebastianbergmann/phpunit/blob/9.3.0/ChangeLog-9.3.md

$ vendor/bin/phpunit -c core -v
PHPUnit 8.5.15 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.24-3+ubuntu18.04.1+deb.sury.org+1
Configuration: /home/dave/projects/drupal8/drupal/core/phpunit.xml.dist

  Warning - The configuration file did not pass validation!
  The following problems have been detected:

  Line 64:
  - Element 'coverage': This element is not expected.

  Test results may not be as expected.

This might look OK on testbot but I guess the config loading is different or the warning is lost somewhere?

longwave’s picture

Version: 9.3.x-dev » 10.0.x-dev
Status: Needs review » Postponed
longwave’s picture

Status: Postponed » Needs review
FileSize
2.25 KB

Following #3252010: Lock PHPUnit to 9.5 we can make this change in 10.0.x.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Yes.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8220c91 and pushed to 10.0.x. Thanks!

  • alexpott committed 8220c91 on 10.0.x
    Issue #3222004 by mondrake, longwave: phpunit.xml is using a deprecated...

Status: Fixed » Closed (fixed)

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