WordPress.org

Make WordPress Core

Ticket #53363: 53363-07-add-schema-to-config.patch

File 53363-07-add-schema-to-config.patch, 1.5 KB (added by jrf, 4 months ago)

PHPUnit config files: add schema reference The current config files validate against the PHPUnit XSD schema for config files for PHPUnit 5.7 - 9.2. The schema was changes in PHPUnit 9.3 and the filter and logging configuration deprecated in favour of coverage and a different format for logging. By setting the schema, deprecation notices about the use of an outdated schema when running on PHPUnit 9.3+ are prevented.

  • phpunit.xml.dist

    From d60b1435a90a62727b5a9ad303baa5480d1469cd Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Tue, 20 Jul 2021 08:59:12 +0200
    Subject: [PATCH] PHPUnit config files: add schema reference
    
    The current config files validate against the PHPUnit XSD schema for config files for PHPUnit 5.7 - 9.2.
    
    The schema was changes in PHPUnit 9.3 and the `filter` and `logging` configuration deprecated in favour of `coverage` and a different format for `logging`.
    
    By setting the schema, deprecation notices about the use of an outdated schema when running on PHPUnit 9.3+ are prevented.
    ---
     phpunit.xml.dist            | 2 ++
     tests/phpunit/multisite.xml | 2 ++
     2 files changed, 4 insertions(+)
    
    diff --git a/phpunit.xml.dist b/phpunit.xml.dist
    index 7a2cef3378..551a952606 100644
    a b  
    11<phpunit
     2        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     3        xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.2/phpunit.xsd"
    24                bootstrap="tests/phpunit/includes/bootstrap.php"
    35                backupGlobals="false"
    46                colors="true"
  • tests/phpunit/multisite.xml

    diff --git a/tests/phpunit/multisite.xml b/tests/phpunit/multisite.xml
    index fad237b19b..9362ecae30 100644
    a b  
    11<phpunit
     2        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     3        xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.2/phpunit.xsd"
    24                bootstrap="includes/bootstrap.php"
    35                backupGlobals="false"
    46                colors="true"